string
)Converts string to uppercase
LET
up: string = upper FROM
string "hello" _
Converts string to lowercase
LET
low: string = lower FROM
string "HELLO" _
Returns length of string
LET
length: int = len FROM
string "hello" _
Removes leading/trailing whitespace
LET
trimmed: string = trim FROM
string " hello "
_Replaces all occurrences of 'old' with 'new'
LET
replaced: string = replace FROM
string
"hello" ("l", "w")Splits string into list by delimiter
LET
parts: list = split FROM
string "a,b,c"
(",")Joins list elements with string as delimiter
LET
joined: string = join FROM
string "," (["a",
"b"])Checks if string contains substring
LET
has: bool = contains FROM
string "hello"
("el")Checks if string starts with prefix
LET
starts: bool = starts_with FROM
string
"hello" ("he")Checks if string ends with suffix
LET
ends: bool = ends_with FROM
string "hello"
("lo")Repeats string count times
LET
repeated: string = repeat FROM
string "ha"
(3)Reverses the string
LET
rev: string = reverse FROM
string "hello" _
Gets substring from start position
LET
sub: string = substr FROM
string "hello" (1,
3)Pads string left with char
LET
padded: string = pad_left FROM
string "42"
(5, "0")Pads string right with char
LET
padded: string = pad_right FROM
string "42"
(5, "0")Capitalizes first character
LET
cap: string = capitalize FROM
string "hello"
_Converts string to title case
LET
titled: string = title FROM
string "hello
world" _math
)Square root
LET
root: float = sqrt FROM
math 16.0 _Power function
LET
power: float = pow FROM
math 2.0 (3)Absolute value
LET
abs_val: float = abs FROM
math -42.5 _Floor function
LET
floor_val: int = floor FROM
math 3.7 _Ceiling function
LET
ceil_val: int = ceil FROM
math 3.2 _Rounds to specified decimal places
LET
rounded: float = round FROM
math 3.14159 (2)
Sine function
LET
sin_val: float = sin FROM
math 0.0 _Cosine function
LET
cos_val: float = cos FROM
math 0.0 _Tangent function
LET
tan_val: float = tan FROM
math 0.0 _Returns π constant
LET
pi_val: float = pi FROM
math _ _Returns e constant
LET
e_val: float = e FROM
math _ _Returns minimum value
LET
minimum: float = min FROM
math (1.0, 2.0,
3.0)Returns maximum value
LET
maximum: float = max FROM
math (1.0, 2.0,
3.0)Arc sine function
LET
asin_val: float = asin FROM
math 0.5 _Arc cosine function
LET
acos_val: float = acos FROM
math 0.5 _Arc tangent function
LET
atan_val: float = atan FROM
math 0.5 _Natural logarithm
LET
ln_val: float = log FROM
math 2.718 _Base-10 logarithm
LET
log_val: float = log10 FROM
math 100.0 _
Exponential function (e^x)
LET
exp_val: float = exp FROM
math 1.0 _Factorial of a number
LET
fact: int = factorial FROM
math 5 _Greatest common divisor
LET
gcd_val: int = gcd FROM
math (12, 18)Least common multiple
LET
lcm_val: int = lcm FROM
math (12, 18)Checks if number is prime
LET
prime: bool = is_prime FROM
math 17 _Converts radians to degrees
LET
deg: float = degrees FROM
math 3.14159 _
Converts degrees to radians
LET
rad: float = radians FROM
math 180.0 _random
)Random float between 0 and 1
LET
r: float = rnd FROM
random seed _Random integer between 0 and stop-1
LET
n: int = rnd FROM
random seed (10)Random integer between start and stop
LET
d: int = rnd FROM
random seed (1, 6)Random element from list
LET
item: any = choice FROM
random [1, 2, 3] _
Shuffles list in place
LET
shuffled: list = shuffle FROM
random [1, 2,
3] _Random sample from list
LET
samples: list = sample FROM
random
[1,2,3,4,5] (3)type
)Checks if value is integer
LET
is_int: bool = is_int FROM
type 42 _Checks if value is float
LET
is_float: bool = is_float FROM
type 3.14 _
Checks if value is string
LET
is_str: bool = is_string FROM
type "hello" _
Converts value to integer
LET
num: int = to_int FROM
type "42" _Converts value to float
LET
num: float = to_float FROM
type "3.14" _
Converts value to string
LET
str: string = to_string FROM
type 42 _Checks if value is list
LET
is_lst: bool = is_list FROM
type [1,2,3] _
Checks if value is boolean
LET
is_bool: bool = is_bool FROM
type true _
Gets value of specified type
LET
val: any = get FROM
type "42" ("int")Converts value to boolean
LET
bool_val: bool = to_bool FROM
type "true" _
list
)Sorts list
LET
sorted: list = sort FROM
list [3,1,2] _
Reverses list
LET
rev: list = reverse FROM
list [1,2,3] _
Maps function over list
LET
doubled: list = map FROM
list [1,2,3] (x =>
x * 2)Filters list by function
LET
evens: list = filter FROM
list [1,2,3,4] (x
=> x % 2 == 0)Reduces list using function
LET
sum: int = reduce FROM
list [1,2,3] ((x,y)
=> x + y)Finds index of element
LET
idx: int = find FROM
list [1,2,3] (2)Counts occurrences of element
LET
cnt: int = count FROM
list [1,2,2,3] (2)
Sums all elements
LET
total: int = sum FROM
list [1,2,3] _Average of elements
LET
average: float = avg FROM
list [1,2,3] _
Combines two lists
LET
zipped: list = zip FROM
list [1,2] ([3,4])
Adds indices to elements
LET
enum: list = enumerate FROM
list ["a","b"] _
Gets sublist from start to end
LET
sub: list = slice FROM
list [1,2,3,4] (1, 3)
Concatenates two lists
LET
combined: list = concat FROM
list [1,2]
([3,4])Gets unique elements
LET
uniq: list = unique FROM
list [1,2,2,3] _
time
)Current timestamp
LET
timestamp: float = now FROM
time _ _Formats time string
LET
date: string = format FROM
time 1704067200
("%Y-%m-%d")Parses time string
LET
ts: float = parse FROM
time "2024-01-01"
("%Y-%m-%d")Pauses execution
LET
_ = sleep FROM
time 1.5 _file
)Reads file contents
LET
content: string = read FROM
file "test.txt"
_Writes to file
LET
success: bool = write FROM
file
"test.txt"("Hello")Checks if file exists
LET
exists: bool = exists FROM
file "test.txt" _
Deletes file
LET
deleted: bool = delete FROM
file "test.txt"
_Renames file
LET
success: bool = rename FROM
file "old.txt"
("new.txt")Gets file size in bytes
LET
size: int = size FROM
file "test.txt" _
system
)Gets command line arguments
LET
args: list = args FROM
system _ _Gets environment variable
LET
path: string = env FROM
system "PATH" _
Executes system command
LET
output: string = exec FROM
system "echo
Hello" _Exits program with status code
LET
_ = exit FROM
system 0 _