I agree with the "re-implementing" comp sentiment. It reminds me of *A tutorial on the universality and expressiveness of fold <http://www.cs.nott.ac.uk/~gmh/fold.pdf> *where, essentially lots of standard functions can be defined in terms of reduce which could be considered "primitive."
In fact, section 5 of that document defines comp as a reduce involving the identify function in some way. (Now, I want to re-read this paper, but translated into Clojure.) On Wednesday, May 7, 2014 9:17:46 AM UTC-4, Mark Watson wrote: > > What is the difference between: > > (reduce #(%2 %) 6 [(partial + 12) (partial * -1)]) > > and > > ((apply comp [(partial * -1) (partial + 12)]) 6) > > Using reduce *looks* nicer to me, but I feel like I'm re-implementing > comp. Their performance is also the same (go inlining!). > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.