On Aug 8, 2012, at 2:50 PM, Timothy Baldridge wrote: > I'm not sure if this is exactly what you're looking for, but this sort of > thing is pretty cool: > > (defn make-point [x y] > (fn [member] > (cond (= member :x) x > (= member :y) y))) >
I actually have a whole chapter on this. (Arguably, the whole first part of the book leads up to that chapter.) I even use Point as an example! But "it's functions all the way down!" is not what I'm looking for in this section. Because you wouldn't use such a scheme instead of conventional objects. ----- Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile -- 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