def (function)
Defines your own command.
Syntax
def name(p: Type): ReturnType = expression
Description
Defined with def; return type is written with :. The body is given with = (single expression) or a { } block.
Example
Loading editor…
This language is for reference/learning only — copy the code and try it in your own environment.
Expected output
25 17
When to use?
Preventing code repetition, breaking the program into parts.