Skip to content

Instantly share code, notes, and snippets.

@rubysolo
Last active December 17, 2015 18:29
Show Gist options
  • Save rubysolo/5654008 to your computer and use it in GitHub Desktop.
Save rubysolo/5654008 to your computer and use it in GitHub Desktop.
(#(map (fn [i] (take i %1)) (range 1 (inc (count %1)))) '(1 2 3))
# => ((1) (1 2) (1 2 3))
(#(map (fn [i] (take i %1)) (range 1 (inc (count %1)))) [:a :b :c])
# => ((:a) (:a :b) (:a :b :c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment