potato 😀 2 ⧼ ! to create a custom function first we use the potato keyword to signify that we want to create a custom function.
! then we add the name of the function and the number of arguments that the function will take.
(`HELLO`)> ! prints HELLO
($1)> ! to acces function args we use $1 for the first args and so on
create z with ((plus 0xA.9 $1 $2))< ! new variable z with the value of the sum of the first two arguments and 169 (0xA9 in hex)
(z)> ! prints z
potato 😂 1 ⧼ ! to create a custom function first we use the potato keyword to signify that we want to create a custom function.
! then we add the name of the function and the number of arguments that the function will take.
(`BYE`)> ! prints HELLO
create z with ((plus 0xFF $1))< ! new variable z with the value of the sum of the first two arguments and 169 (0xA9 in hex)
return z ! at the end we return z notice there is no colon b/c were returning something
â§½
create z with ((new 😂 z))< ! to call custom function we must use the new keyword followed by the function name seperated argumentsaa
return z ! at the end we return z notice there is no colon b/c were returning something
â§½
((new 😀 1 0xA))> ! to call custom function we must use the new keyword followed by the function name seperated arguments
! prints HELLO and on a new line 1 and on a new line 180