On 22.12.2009, at 22:14, Chouser wrote: > It's interesting to me that the definition of maybe-comp above is > arguably simpler that the definition of maybe-m, even without > counting the machinery of 'defmonad'. Presumably this is a hint > to how much more powerful maybe-m is than maybe-comp, and simply > shows I don't yet understand the power of monads.
If the only monad you are ever going to use is maybe-m, then indeed you are better off with your specialized maybe-comp function. But you can make the same point about any abstraction; they never pay off for a single application. What you gain with monads compared to maybe-comp and similar special cases is generality: you can apply the monad approach to function composition to many different situations and don't have to start from scratch each time. Konrad. -- 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