Skip to content

Instantly share code, notes, and snippets.

Created August 25, 2011 21:13
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 anonymous/1171983 to your computer and use it in GitHub Desktop.
Save anonymous/1171983 to your computer and use it in GitHub Desktop.
;; 0x89's solution to Lazy Searching
;; https://4clojure.com/problem/108
(fn i
[& x]
(let [f first
a apply
[[b & e] & c] (sort-by f x)]
(if (a = (map f x))
b
(a i (conj c e)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment