Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(defn delayed
[p init]
(let [prev (atom init)]
(fn delayed-pred [& args]
(let [now (apply p args)
ret @prev]
(reset! prev now)
(take-while (delayed #(< % 200) true) [64 70 200 90])
;; No, don't use this. It's silly.
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.