Hey Glen, it appears that zipmap most directly corresponds to your initial 
question.

The only complicating aspect is your desire for nils, which (concat result 
(repeat nil)) addresses. 

  (zipmap [:fullname :lastname :firstname :middlename] (concat result 
(repeat nil)))

If it weren't for the need for nils,

  (zipmap [:fullname :lastname :firstname :middlename] result)

is simple and noise-free.  Note that the nils are unnecessary if later 
using map destructuring:

   (defn use-names [{:keys [fullname lastname firstname middlename]}] 
(println fullname lastname firstname middlename))

For example, nils are generated at call time for you by the map 
destructuring:

  (use-names (zipmap [:fullname :lastname :firstname :middlename] ["John 
Lou Doe" "Doe" "John"]))

  ;=> John Lou Doe Doe John nil



-- 
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/d/optout.

Reply via email to