Skip to content

Instantly share code, notes, and snippets.

Created December 8, 2011 06:24
Show Gist options
  • Save anonymous/1446277 to your computer and use it in GitHub Desktop.
Save anonymous/1446277 to your computer and use it in GitHub Desktop.
;; flengyel's solution to Function Composition
;; https://4clojure.com/problem/58
(fn comb [f & fs]
(fn [x & xs] (let [arglist (conj xs x)]
(if (nil? fs)
(apply f arglist)
(f (apply (apply comb fs) arglist))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment