Skip to content

Instantly share code, notes, and snippets.

@oranenj oranenj/scratch.clj
Created Aug 6, 2009

What would you like to do?
(defn foo [f pred as bs]
((fn gen [[a & as] [b & bs :as all-bs]]
(when a
(let [p (pred a)]
(cons (if p
(f a b) a)
(gen as (if p bs all-bs)))))))
as bs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.