On Wed, Jul 22, 2009 at 5:17 PM, mmwaikar <[email protected]> wrote:
> So if this is the intended behavior of apply, which function should I > use in this case? Is there anything in Clojure where I can apply any > user-defined function to each and every element of a list one-by-one? Use map: user=> (map #(* 5 %) [1 2 3 4 5]) (5 10 15 20 25) (Here I also made the multiply-by-five function an anonymous lambda.) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
