Page 33 (PDF page 78):
You write that args.foreach(println) "takes advantage of a special
shorthand". But this piece of code is actually just using a function as
first-class object.
Additionally, you write that "if a function literal consists of one
statement that takes a single argument, you need not explicitly name and
specify that argument". Again, this is just using a function as a value,
and it is not restricted to functions of one argument.
The text in the footnote about "partially applied functions" is just
showing off, it's not really relevant to that text...
|