yeet
This commit is contained in:
@@ -3,7 +3,10 @@ package P10
|
||||
object Curry {
|
||||
def main(args: Array[String]): Unit = {
|
||||
val curriedSum: Double => Double => Double => Double => Double = a => b => c => d => a+b+c+d
|
||||
val curSum2 = curriedSum(1)(2)
|
||||
print(curSum2(3)(4))
|
||||
def currieSum2(a:Int)(b:Int): Int => Int => Int = (x:Int)=>(y:Int) => a+b+x+y
|
||||
val curFunc = curriedSum(1)(2)
|
||||
val curFunc2 = currieSum2(1)(2)
|
||||
println(curFunc(3)(4))
|
||||
println(curFunc2(3)(4))
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user