Expand description
The built-in library and the root scope.
root_scope creates the scope in which Swan code normally runs. It
contains these bindings:
| Name | Kind | Description |
|---|---|---|
TRUE, FALSE | constant | The boolean values |
type | function | The type name of a value |
parse | function | Compiles Swan source text into a function |
bind, label | function | Bind names in the global scope |
bool | namespace | Boolean conversion and reduction |
numb | namespace | Number conversion |
text | namespace | Text inspection and manipulation |
list | namespace | List inspection and manipulation |
nspace | namespace | Namespace inspection |
math | namespace | Mathematical constants and functions |
time | namespace | Timestamps and calendar dates |
promise | namespace | Creating and resolving promises |
undef | namespace | Creating and inspecting undefined values |
Every function is documented, with examples, in the built-in library reference of the Swan language manual.
Functionsยง
- root_
scope - Builds a fresh scope in which every built-in name is available.