currying - Higher-order functions in Clojure -


Closer is great, we all know it, but this is not the point I'm thinking that in ways like Haskell The idiomatic way to create and manage high-order functions is to do the following in the closet:

  (defn sum [ab] (+ ab))   

but the (sum1) function does not return: This causes an error. Of course, you can do something like this:

  (defn sum ( [A] (partial + A)) ([ab] (+ Ab)))   

In this case:

  user = & gt; (Zodiac1) # & lt; Core $ partial $ fn__3678 clojure.core$partial$fn__3678@1acaf0ed> User = & gt; ((Amount 1) 2) 3   

But this is not the right way to move forward. any idea?
I'm not talking about implementing the sum function, I'm talking on a high level abstraction. Do any idiomatic patterns follow? Some macros? What is the best way to define a macro or what are the alternative solutions?

You can specify how many arguments of the function are, and this By doing so you will do so until it becomes many.

The reason for this is not by default in the closure that we automatically queried functions, I think.

Comments