Call a function: Difference between revisions
m
→{{header|BQN}}
(add bqn) |
m (→{{header|BQN}}) |
||
Line 830:
<lang bqn>⟨+, -, ∾⟩</lang>
'''Obtaining the return value of a function:''' A block function will always return the value of the last statement within it. To obtain the return value of a function, you can assign it to a variable, or modify an existing variable with the return value.
Line 838:
Arguments are passed to BQN functions by value only.
'''Partial Application:''' BQN has two combinators for this purpose. Before (<code>⊸</code>) returns a function with a constant left argument, and After (<code>⟜</code>) returns a function with a constant right argument.
<lang bqn>+⟜2</lang> will add two to the number given to it.
|