Skip to content

Instantly share code, notes, and snippets.

@dabd
Created May 22, 2013 07:20
Show Gist options
  • Save dabd/5625808 to your computer and use it in GitHub Desktop.
Save dabd/5625808 to your computer and use it in GitHub Desktop.
(defn f
[]
(reduce (fn [list new-val] (let [[left right] (split-with (fn [val]
(>= val new-val))
list)]
(concat left [new-val] right)))
(take 1 (range 2000))
(drop 1 (range 2000))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment