On Mon, Jan 12, 2009 at 6:48 PM, Jason Wolfe <[email protected]> wrote: > > (defn map-when "Like map but discards logically false entries" > [fn & seqs] > (filter identity (apply map fn seqs)))
I'd use map-when. > (defn iterate-while [f x] > (take-while identity (iterate f x))) This one too. It raises a question, though -- how much functionality should a function provide to be worth making everyone who reads the code learn the new vocabulary? I've written each of these inline when I've needed them. Are they better as idioms or functions? --Chouser --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
