Here’s an example of implementing a function:

    For functions that contain just one expression, you can use a shorthandsyntax:

    Note: Only an expression—not a statement—can appear between the arrow (=>) and the semicolon (;). For example, you can’t put an there, but you can use a conditional expression.

    Note: Some APIs — notably widget constructors — use only named parameters, even for parameters that are mandatory. See the next section for details.