Class Function
The Function
class represents a block of code to be called, which may or
may not produce a value. Function
values are first-class, and can be
passed around as arguments, placed into a List
, and so on.
The arguments of a Function
are denoted within parentheses, with an
optional colon at the end to denote the value returned:
Function(Integer): String
(return String
).
Function(String, String)
(no value returned).