Beautiful. I haven't gotten to juxt and identity yet, and this works brilliantly....
On Friday, February 15, 2013 7:58:09 PM UTC-5, Sean Corfield wrote: > > (into {} (map (juxt :id identity) map-array)) ;; the first thing that > comes to mind > > On Fri, Feb 15, 2013 at 4:55 PM, Jonathon McKitrick > <jmcki...@gmail.com <javascript:>> wrote: > > I'd like turn an array of maps into a map of maps, extracting a unique > id > > from each map as the key. > > > > (into {} (map #([(:id %) %]) map-array) > > > > was my first attempt, but I'm not sure the syntax would work anyway. > > However, the first question (and obvious error cause) is how to repeat > > MAP-ARRAY twice inside the lambda expression without writing a new FN. > Or > > am I going down the wrong path here? > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clo...@googlegroups.com<javascript:> > > Note that posts from new members are moderated - please be patient with > your > > first post. > > To unsubscribe from this group, send email to > > clojure+u...@googlegroups.com <javascript:> > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > > --- > > You received this message because you are subscribed to the Google > Groups > > "Clojure" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to clojure+u...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > -- > Sean A Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > World Singles, LLC. -- http://worldsingles.com/ > > "Perfection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880) > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.