// Functions
f(x) = x * 2
f = (x) -> x * 2
// Objects
x = { foo = bar, baz = quux }
// Lists
y = [foo, bar, baz, quux]
// Let
f(x) = (
y = x*x
) => y*y
// Single-line
f(x) = (y = x*x) => y*y
// Methods
obj = {
val = 5
obj.plus_val(x) = x + obj.val
}
bla = obj.val // bla == 5
blo = obj.plus_val(3) // blo == 8
// Operator definitions
true = {
(true || x) = true
(true && x) = x
}
false = {
(false || x) = x
(false && x) = false
}