🧑🔧 Chapter 5: Functions
✏️ Defining Functions
To define a function or SUBroutine, use a submarine >(funcNameHere)
along with
any parameters ><param>
. To return a value, use a squid <~
or 🦑
.
Here the function is called submarine
and has 3 parameters. It returns the sum
of the 3 parameters.
>(submarine) ><param1> ><param2> ><param3>
><>
<~ ><param1> ><param2> ><param3> ~
<><
📞 Calling Functions
- To call a subroutine, put the submarine in a Fysh tank along with its
arguments. If two or more params are next to each other, separate them with
Fysh food
-
.
[>(submarine) ><fysh1> - ><fysh2> - ><fysh3>] ~