The intent of the mapping can be made clearer with destructuring I

> think. Also, flatten is not needed: a core function called "into" will
> transform a sequence of key/value pairs into a map.
>
> (def age-index
>  (into (sorted-map)
>    (map (fn [[k [name age]]] [age k]) data)))
>

Jarkko,
Thank you for your clear, clean code.  It's nice to have such a helpful
Clojure community!

Chad Harrington
chad.harring...@gmail.com

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