Use &
to capture functions from other modules. You can use the captured functions directly as function parameters or within anonymous functions.
Compare the two programs below:
Capturing functions without passing any arguments require you to explicitly specify its arity, e.g. &String.capitalize/1
: