Language reference · Section 7
Built-in functions
These are always available without seed:
| Function | Meaning |
|---|---|
drop(values...) |
print the values separated by spaces, then a newline |
ask(prompt: str = "") -> str? |
print the prompt, read a line from standard input; none at end of input |
len(x) -> int |
length of a string (in characters), list, map or set |
int, float, str, byte |
conversions (section 3.2) |
type_of(x) -> str |
the type's name, for messages and debugging |
assert(cond: bool, message: str = "") |
throw an AssertError if cond is bad |
exit(code: int = 0) |
end the program |
drop is an ordinary function, not a statement: it is always called with
parentheses, drop("hi").