types:
- string
- number
- boolean
- function
a = 0;
b = "str";
c = true;
test = fn x: num, y: str, z: bool -> str {
"num:" + x + " str:" + y + " bool:" + z
};
- if
a = 20;
if a == 0 {
} else if a == 10 {
} else {
}
- is
a = 20;
a is {
> 6 -> it * 10,
: num -> "num: " + it
}
def Result = str | num;
- fn arg: type -> return type
- fn arg: (fn arg: type -> return type) -> return type
test = fn x: num, y: str, z: bool -> str {
"num:" + x + " str:" + y + " bool:" + z
};
wrapper = fn inner: (fn a: num -> num) -> num {
inner(20)
};
wrapper({
a * 4
})