Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Welcome to Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25).
- Type in expressions to have them evaluated.
- Type :help for more information.
- scala> def trzyArgsy(a: Int, b: Int, c: Int): Int = a*b/c
- trzyArgsy: (a: Int, b: Int, c: Int)Int
- scala> def curry[A,B,C,D](f: (A, B, C) => D): A=>B=>C=>D = { (a:A) => (b:B) => (c:C) => f (a,b,c) }
- curry: [A, B, C, D](f: (A, B, C) => D)A => (B => (C => D))
- scala> curry(trzyArgsy)
- res3: Int => (Int => (Int => Int)) = <function1>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement