In Java (Java 7 and before) we can store an object reference in a variable or some primitive value in which case Classes and Primitive types are the first class citizens there, but in Scala we can assign method/function definitions to variables, we can pass around function definitions to other functions and we can even declare functions within fuctions (i.e private functions). In this small article I will show you how to:Assign functions to variables also called Function ValuesPass functions as argument...
|
1
Pins |
|
||
|
To post comments using your Facebook,Twitter, Gmail etc credentials in the Discus comments section. Or use your Javapins credentials at the end of the page.
To post your comment as a Javapins user please login or signup to Javapins database.
|