Skip to content

Instantly share code, notes, and snippets.

@pjstadig
Forked from drone29a/domap.clj
Created April 2, 2009 15:27
Show Gist options
  • Save pjstadig/89253 to your computer and use it in GitHub Desktop.
Save pjstadig/89253 to your computer and use it in GitHub Desktop.
(defn domap [f & colls]
(let [num-colls (count colls)]
(doseq [args (partition num-colls (apply interleave colls))]
(apply f args))))
(domap println [1 2])
(domap println [1 2] [3 4])
(domap println [1 2] [3 4] [5 6])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment