Partially applied functions in Scala

Before going into Partially applied Functions, let me introduces 2 terms-
Function Literal- This exists in the source code- Something similar to Class definition. So we have

(x:Int,y:Int) => x+y

Function value- When this function literal is assigned to a reference they become function values. The are similar to the Objects created from the class. These are created at runtime

var sum = (x:Int,y:Int) => x+y

So in the above case we can use sum to invoke the method.

println(sum(5,7))

Read more

%d bloggers like this: