Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



#currying #functions #scala

Curried functions are defined with multiple parameter lists, as follows:

def strcat(s1: String)(s2: String) = s1 + s2

Alternatively, you can also use the following syntax to define a curried function:

def strcat(s1: String) = (s2: String) => s1 + s2
If you want to change selection, open document below and click on "Move attachment"

Scala Currying Functions
esume WritingComputer GlossaryWho is Who Scala Currying Functions Advertisements Previous Page Next Page Currying transforms a function that takes multiple parameters into a chain of functions, each taking a single parameter. <span>Curried functions are defined with multiple parameter lists, as follows: def strcat(s1: String)(s2: String) = s1 + s2 Alternatively, you can also use the following syntax to define a curried function: def strcat(s1: String) = (s2: String) => s1 + s2 Following is the syntax to call a curried function: strcat("foo")("bar") You can define more than two parameters on a curried function based on your requirement. Let


Summary

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Details



Discussion

Do you want to join discussion? Click here to log in or create user.