Clojure: Wrong number of args (4) passed to: core$rest -


Write the function

that allows you to create function compositions should take a variable number of functions in the parameter list, And they should be applied from the right-to-left by creating a function.

  (fn [& amp; F] (fn [& amp; amp;]] (->> (reverse FS) (decrease #% 2% 1 Apply)))))   

  = & gt; (= [3 2 1] ((_ rest reverse) [1 2 3 4]) clojure.lang.ArityException: Wrong number of ARG (4) passed: core $ rest   

What is the reason for this error? I can not see it

This is in your applicable - this parameter is used for the parameters Changes to a flat list, make a call like this:

(rest 1 2 3 4)

Which is probably not what you want ... .. and tells you the error you get.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -