Skip to content

Instantly share code, notes, and snippets.

@Chouser
Created January 20, 2009 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chouser/49679 to your computer and use it in GitHub Desktop.
Save Chouser/49679 to your computer and use it in GitHub Desktop.
(defn same-size [& cols]
(let [size (reduce max (map count cols))]
(apply interleave
(map #(concat % (replicate (- size (count %)) 0)) cols))))
user=> (same-size [1 2] [3 4 5])
(1 3 2 4 0 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment