#913 Is there another way of currying?

fury Thu 14 Jan 2010

I've managed to "curry" a function by creating a closure:

class Foo
{ 
  static Int add(Int a, Int b) { return a + b }

  static Void main() 
  { 
    m := |Int i->Int| { add(3,i) }
    echo(m(3)) 
  }
}

Are there other ways of currying?

brian Fri 15 Jan 2010

Just using closures that wrap other functions/methods

Login or Signup to reply.