Forked from anonymous/flengyel-4clojure-solution58.clj
Created
December 8, 2011 06:29
-
-
Save flengyel/1446286 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
;; flengyel's solution to Function Composition | |
;; https://4clojure.com/problem/58 | |
;; comp is disallowed. The composition has function type | |
(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