Scripting reference · Nerdamer Language
return
Ends a function or block early with a value.
In a function you defined, return ends the function. Outside one, it ends the outermost block.
Scripting
return(value)
Write it in a script: nerdamer('block(return(7),9)'), or in the Playground.
Parameters
value- The value to return.
Examples
Return early for a negative input.
g(x):=block(if(x<0, return(0), 0), sqrt(x)); g(-4)
// → 0Open in Playground