Created
September 19, 2011 03:21
-
-
Save srid/1225913 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
;; amalloy's solution to http://4clojure.com/problem/60 | |
(fn r | |
([f [x & coll]] (r f x coll)) | |
([f acc coll] | |
(lazy-seq | |
(if-let [[x & coll] (seq coll)] | |
(cons acc | |
(r f (f acc x) coll)) | |
[acc])))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment