Skip to content

Instantly share code, notes, and snippets.

@gfredericks
Created July 25, 2010 18:56
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 gfredericks/489785 to your computer and use it in GitHub Desktop.
Save gfredericks/489785 to your computer and use it in GitHub Desktop.
(defn my-split-with
[pred coll]
(let [evaled (map (fn [x] [x (pred x)]) coll)
t (take-while #(% 1) evaled)
d (drop-while #(% 1) evaled)]
[(map first t) (map first d)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment