Skip to content

currying? #1

dominictarr opened this Issue Apr 18, 2012 · 2 comments

2 participants


what about functions that take more than one argument?

can you still find cases like:

  var _m = c(Y)
  a(b(_m), d(_m)))

or have I misunderstood something?


Functions that take more than 1 argument can be decomposed into multiple curried functions of a single argument. I want to transform input automatically for this. Harder to add is allowing function arguments to functions and also solving for composition under those function arguments too.


ah yes, that is why haskell represents the type of a function as

a -> b -> c 

it can just trivially curried to be a function that takes a and returns another function with sig b -> c

thinking about this, if you have a function that take an argument ( b -> c ) then you could curry a -> b -> c
and pass that to it. so then you could compose

a -> b -> c with ( b -> c) -> d correct?

what about cases where you have

a -> b, a -> c, and b -> c -> d

clearly that is composable too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.