1
Pins

Functions as First Class Citizens in Scala

posted by anishaanisha 619 days, 10 hours, 47 minutes ago
Wednesday, August 08, 2012 9:40:24 PM GMT

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...

category: Java EE | clicked: 0 | | source: www.javabeat.net | show counter code
tags: functions, Scala


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.