Something like the 'for' macro (if it is thought of as a non-general monad) can be implemented in terms of reduce. Is there a reason this isn't so?

I can think of two:

* filter and map are lazy. Implementing every? and some? in those terms would needlessly introduce lazy sequences to the mix. That introduces a tiny amount of additional cost, and...

* core does some ugly things (redefinitions, avoiding the use of some functions because they haven't been defined yet, writing things in Java, etc. etc.) for the sake of speed, because core is used *everywhere*. It's not necessarily a manual for good Clojure style unless you understand which constraints apply.

--
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

Reply via email to