Rich Hickey wrote: > On Feb 4, 10:36 pm, Conrad <drc...@gmail.com> wrote: > >> It is useful to build a map from a list of keys and a value generator >> function. Of Course, such a function is easy to write: >> >> (defn genmap [keys fun] >> (zipmap keys (map fun keys))) >> >> In fact, it seems so useful that it must be in the standard API >> somewhere, but I can't find it... did I miss it somewhere, or was I >> right to create my own? Please let me know if I'm reinventing the >> wheel. >> > > It does seem useful, although the zipmap call is already concise. > > I wonder if this is a frequently reinvented wheel. >
I had an almost identical (if less elegant) function to "genmap" as well in my files. Adding it to core would be nice. Albert -- Albert Cardona http://albert.rierol.net --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---