Booleans and Comparison

Essentials

FunctionDescription
nullA null value. To export as null in JSON or ~ in YAML
trueConstant logical true
falseConstant logical false
ifIf c is true, return t else f
then(t, f, c)For pipeline if: - x? then(t, f)
when(p?, f, x)When x satisfies p? apply f else pass through unchanged

Error and Debug Support

FunctionDescription
panicRaise runtime error with message string s
assert(p?, s, v)If v p? is true then return v otherwise error with message s. Composable in pipelines: x assert(non-nil?, "expected non-nil")

Boolean Logic

FunctionDescription
notToggle boolean
(! b)Not x, toggle boolean
(¬ b)Not x, toggle boolean
andTrue if and only if l and r are true
orTrue if and only if l or r is true