Builtin

import

import("a")

Imports module a, or loads and runs file a.

If a is a file name (i.e. a Ra file), it is loaded, parsed and executed.

If a is a directory name (i.e. a module name), it does the following:

Some modules are built-in, e.g. os, maths, http, date. Others can reference directory names on disk that contain init.ra files.

Examples

built-in
import("maths")
print(maths.tau)
6.28

built-in alternative
import("math")
print(math.tau)
6.28

Run a Ra program
import("test1.ra")