> Again, thanks for all the help.  One last question, though- how would
> I apply the 'map' function to an actual associative mapping?  I mean-
>
> (defn testFunc [x] (* x 2))
> (println (map testFunc {:a 1 :b 2 :c 3}))

The items in a associative container come out as a pair, which you can  
destructure in your argument list.

map produces a sequence, which you can turn into a map using 'into':

user=> (println (into {} (map (fn [[x y]] [x (* 2 y)]) {:a 1 :b 2 :c  
3})))
{:c 6, :b 4, :a 2}
nil

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to