On Feb 4, 10:36 pm, Conrad <[email protected]> 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.
Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---