Global Functions
Core built-in functions.
| Name | Summary |
|---|---|
| Err | Creates a result object representing an error. |
| Ok | Wraps a value in a result object with no error. |
| array | Converts an object to an array. |
| asciiCode | Returns the ASCII code of a single-character string. |
| bool | |
| echo | Prints values to the console. |
| error | Creates a new error object with the given message. |
| exit | |
| expect | |
| float | Converts an object to a float. |
| hash | Returns the hash value of a hashable object. |
| int | Converts an object to an integer. |
| panic | Stops execution and reports an error. |
| scan | Reads a line of input from the user. |
| string | |
| tuple | Creates a new tuple containing the given elements. |
| type | Returns the type of an object as a string. |
Wraps a value in a result object with no error.
Parameters
| value | The value to wrap. |
result<T>
fn bool()
fn echo(values) -> null
Prints values to the console.
Parameters
| values | Objects to print. |
null
fn exit()
fn expect()
Returns the hash value of a hashable object.
Parameters
| object | The object to hash. |
result<int>
fn panic(message) -> never
fn string()
Creates a new tuple containing the given elements.
Parameters
| elements | Objects to include in the tuple. |
result<tuple>