Is it possible to do something similar in Scala please, i.e. make a function return an in built function( Function that had been composed in the original function) ?
Welcome to Scala 2.13.4 (OpenJDK 64-Bit Server VM, Java 11.0.9.1).
Type in expressions for evaluation. Or try :help.
> val f: Int => Int => Int = x => y => x+y
val f: Int => (Int => Int) = $Lambda$1076/0x00000008405ee040@288f173f
> f(1)
val res0: Int => Int = $Lambda$1088/0x00000008405ff040@d499c13
> f(1)(2)
val res1: Int = 3