Hi, I am trying to understand clojure and found a couple of interesting things about the core library:
1. core.clj is a gigantic library with more than 400 function definitions (378 defns and 62 defmacros to be exact). I didn't expect to find sequence related functions, such as map/reduce in core. Doesn't it make sense to move functions to more 'domain-specific' libraries...even if core.clj eventually imports all these libraries and exposes them as if they were all in the same library? 2. As far as I can tell, many sequence related functions such as every?, some?, etc. are not implemented in terms of map. I was surprised to see that even the for marco doesn't use filter or map. Typically, functional programming texts show how map and filter can be implemented in terms of reduce, and these three can be used to implement almost all sequence related functions. 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? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
