Hi,

It means that some of the maps can be nil, but at least one of them
has to be non-nil. "some" requires a predicate, but since nil is
logical false, we can just use "identity".  Here's the behavior:

    user> (merge nil nil nil)
    nil
    user> (merge {:a 1} nil {:b 2})
    {:b 2, :a 1}

-Stuart Sierra


On Jan 22, 7:16 pm, wubbie <[email protected]> wrote:
> Hi,
>
> Here is def of merge:
>
> (defn merge
>
>   [& maps]
>   (when (some identity maps)
>     (reduce #(conj (or %1 {}) %2) maps)))
>
> How can I interpret  when (some identity maps)?
>
> Thanks
> -sun
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to