blob: 3343e4d3ef40397351fad6520843e131b628b750 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<p>
In Gleam functions are values. They can be assigned to variables, passed to
other functions, and anything else you can do with values.
</p>
<p>
Here the function <code>add_one</code> is being passed as an argument to the
<code>twice</code> function.
</p>
<p>
Notice the <code>fn</code> keyword is also used to describe the type of the
function that <code>twice</code> takes as its second argument.
</p>
|