fn
, var
, include
, if
, else
set
, get
, x
, a
, goto
fn to_hex(in:4b| out:8b) { var check; leeq in 9 check; is in out[-4..]; if check { add "0" out; } else { add "a" out; } }
fn example(a, b:1, c:2b, d:3r | e, f:1, g:4b, h:1r) ^ ^ ^ ^ | | | \_ explicit length | | \____ bitwise length | \__________ bitwise length reversed \_______________ mutability seperator
fn print(string:8b){...} { print "abc"; }
fn print(string:8b){...} { print "c"; print "b"; print "a"; }
⋮ var E; syscall1 arg1 E; set arg2 E; syscall2 arg3 E; if E { var E2; set "Catching exception!" E2; }
No runtime recursion ⇒ differnt runtime and comptime
fn ComptimeIncrement(|A){ var length; lenOf A length; var T; neq length 0 T; if T { if A[0]{ is 0 A[0]; ComptimeIncrement A[1..]; } else { is 1 A[0]; } } }
fn _inc(|A:1b, Carry:1){ if Carry { is A Carry; not A; } } fn inc(|A) { var Carry:1 = 1; _inc A Carry; }
<start> ├──┬──┬>─╮ │ ├╴ ╰──╯ │ ├╴ │ │ ├╴ ├╴ ├╴ ├╴ ├╴ ⋮
<start> -(-x) = x ├──┬──┬>─╮ ├╴ ├╴ ╰──╯ ├╴ ├╴ ├╴ ├╴ ├╴ ⋮
<start> if (false) { => b; ├─────┬>─╮ a; ├╴ ╰──╯ } else { ├╴ ├╴ b; ├╴ ├╴ } ├╴ ├╴ ⋮
<start> ├──────┬>─╮ │ a+ɛ ╰──╯ ├──╴ │ a ├─╴ │ a ├─╴ ⋮