Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 1
    It would be wise to rename apply to uncurry. It works in Haskell too. See the types. Commented Feb 3, 2016 at 2:15
  • 1
    Uh sure it works. But it doesn't pass all the arguments to the inner apply, only a single args, and the rest is done by the outer apply. In Haskell, it becomes (func, (a, b)) instead of (func, a, b), that's what I was confused about Commented Feb 3, 2016 at 2:19
  • 1
    @AaditMShah: Thanks, fixed. When dealing with curried functions, we'd really want to have our parameters to be constant. Hrmpf. Commented Feb 3, 2016 at 2:44
  • 2
    @Bergi great demonstration of a function that utilizes itself re: apply(apply) Commented Mar 12, 2016 at 14:45
  • 1
    @geoffrey If we did const normalAdd = uncurry(curriedAdd), then call normalAdd(1,2,3) and normalAdd(4,5,6), the second call would not work if we had modified fn in the first. Commented Apr 25, 2020 at 10:45