Fork me on GitHub
#code-reviews
<
2016-04-02
>
dancrumb13:04:06

morning folks

dancrumb13:04:27

I have

(defn my-comp
  "Exercise 2: Implementing comp"
  [f & fs]
  (if (nil? fs)
    (fn [& args] (apply f args))
    (fn [& args] (f (apply (apply my-comp fs) args)))
  )
)

dancrumb13:04:00

but the (f (apply (apply my-comp fs) args)) form seems clunky

dancrumb13:04:04

any thoughts?

hiredman18:04:27

if you make the base case for two functions instead of one you can use reduce