Skip to content

Instantly share code, notes, and snippets.

@amalloy
Created June 16, 2011 01:51
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 amalloy/1028531 to your computer and use it in GitHub Desktop.
Save amalloy/1028531 to your computer and use it in GitHub Desktop.
(let [data [14 6 43 195 3214 31], [init more] (split-at 2 data)]
(reduce (fn [[x y] n]
(cond (< n y) [x y]
(< n x) [x n]
:else [n x]))
(reverse (sort init))
more))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment