Every operator in ezc, organized by category. The "stack effect" column
uses the convention before → after, listing the items closest to the
top of the stack rightmost.
op stack effect description
+a b → (a+b)add (within numeric family, promotes)
-a b → (a-b)subtract
*a b → (a*b)multiply
/a b → (a/b)divide (integer for ints, float for floats)
%a b → (a%b)modulo
^a b → (a^b)power
3 4 +
All push 1 for true, 0 for false. There is no separate boolean type.
op stack effect description
==a b → boolequal
!=a b → boolnot equal
<a b → boolless than
>a b → boolgreater than
<=a b → boolless than or equal
>=a b → boolgreater than or equal
op stack effect name
,a → a adup
;a →drop
~a b → b aswap
_a b → a b aover
op stack effect description
:a →write line (any type)
.→ strread line
wla →write line (alias of :)
rl→ strread line (alias of .)
wbint →write a single byte
rb→ intread a single byte
op stack effect description
!varies execute: pops a block/list/string and runs/splats/evals
?cond block →conditional execute (only runs block if cond truthy)
??cond then else → resultternary: pick one branch by truthiness
&cond-block body-block →while loop
&!list block → listmap
&?list block → listfilter
&/list init block → accfold (left-to-right)
1 (10 :) ? # prints 10 because cond was truthy
0 (10 :) ? # prints nothing
1 (10) (20) ?? # → 10
op stack effect description
|a b → (a|b)concatenate strings, lists, or blocks
"foo" "bar" | # → "foobar"
[1 2] [3 4] | # → [1 2 3 4]
form description
@namebind: pop top of stack, store in name
$namerecall: push value of name
namebare: recall, but auto-execute if value is a block
syntax description
(...)block — deferred code, executed by !
[...]list — eager evaluation, gathers leftovers
{...}scope — evaluates immediately with local bindings
op stack effect description
depth→ intcurrent stack height
clearvaries drop everything on the stack
words→ listlist all currently-defined names