Created
January 5, 2016 20:13
-
-
Save anonymous/b5e83b7c75f97236dfea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn timeout-seq [timeout-ms timeout-val coll] | |
(lazy-seq | |
(deref | |
(future | |
(when (seq coll) | |
(cons (first coll) | |
(timeout-seq timeout-ms | |
timeout-val | |
(rest coll))))) | |
timeout-ms | |
(cons timeout-val | |
(timeout-seq | |
timeout-ms | |
timeout-val | |
coll))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment