Skip to content

Instantly share code, notes, and snippets.

@benmiles
Created November 19, 2012 21:36
Show Gist options
  • Save benmiles/4114155 to your computer and use it in GitHub Desktop.
Save benmiles/4114155 to your computer and use it in GitHub Desktop.
;; 158. decurry [medium]
;; http://www.4clojure.com/problem/158
(fn decurry [f]
(fn [& args]
(reduce #(%1 %2)
f
args)))
;; 43. reverse interleave [medium]
;; http://www.4clojure.com/problem/solutions/43
(fn [s n] (map #(take-nth n %) (take n (iterate rest s))))
;; or
#(apply map list (partition %2 %))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment