On Wed, Apr 4, 2012 at 4:11 PM, Alan Malloy <[email protected]> wrote:
> On Apr 4, 6:50 am, David Jagoe <[email protected]> wrote:
>> Particularly I very often find myself doing
>>
>> (apply hash-map (flatten (for [[k v] some-map] ...)))
>
> :( :( :( flatten is vile, never use it[1]. What if the value in the
> map is a list, or the key is a vector? Now you've broken it.

One way to get only one level of flattening is with (apply concat x).

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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

Reply via email to