Back to Fpinscala

03.Answer

answerkey/gettingstarted/03.answer.md

latest241 B
Original Source
scala
// Note that `=>` associates to the right, so we could
// write the return type as `A => B => C`
def curry[A,B,C](f: (A, B) => C): A => (B => C) =
   a => b => f(a, b)

// NB: The `Function2` trait has a `curried` method already