You can define anonymous functions using fn
:
You can use &
for shorthand form, where &N
refers to the N
-th parameter:
Functions can have multiple clauses using pattern matching:
You can define anonymous functions using fn
:
You can use &
for shorthand form, where &N
refers to the N
-th parameter:
Functions can have multiple clauses using pattern matching: