Last week I released a project with a monadic translator that needed to:
- work on sequences of expressions, arbitrarily nested
- generate Clojure code or stop and report the first error
- maintain a symbol table with easy access but not global state
The relevant code is here:
https://github.com/b
I don't know if this is adequately "in the wild" (since it's part of a
monad lib itself), but part of my monads library uses a continuation monad
to let two mutually recursive functions traverse and rebuild a tree
structure without blowing the stack. It would be a pain to do this kind of
thing by h
oops, gen-plan was missing a helper function:
(defn- with-bind [id expr psym body]
`(fn [~psym]
(let [[~id ~psym] ( ~expr ~psym)]
(assert ~psym "Nil plan")
~body)))
On Mon, Apr 8, 2013 at 9:32 AM, Timothy Baldridge wrote:
> I have a love/hate relationship with monads. I th
I have a love/hate relationship with monads. I think their use in Clojure
programming is much more limited than most would like to admit.
However, I have found a very nice use for them: in my case, I'm attempting
to insert a very complex AST into Datomic. I'd like all my data to go into
Datomic as