Created
January 20, 2012 06:38
-
-
Save minikomi/1645793 to your computer and use it in GitHub Desktop.
4Clojure Problem #60
This file contains hidden or 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
(fn [f init & [args]] | |
(let [init-args (if (nil? args) init (cons init args))] | |
(map | |
#(reduce function (take % init-args)) | |
(map #(inc %2) init-args (range))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For each step through, take x elements from initial arguments & reduce with function.