Jarkko Oranen <chous...@gmail.com> writes: [...]
> This way, you can write a function that works under many different > monads, as long as it uses the generic facilities to return monadic > values. eg. a lifted inc: > > (defn m-inc [v] > (m-result (inc v)) > > which can be used in the state monad as an argument to bind, even > though it doesn't care about the state at all. Ah, I hadn't realized that such functions -- of which I've now written several for use in the state monad -- actually say nothing about the state, and can be used in other monads as well. That was helpful to consider. -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en