Created
May 22, 2013 07:20
-
-
Save dabd/5625808 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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