Skip to content
João Pedro Neto edited this page Nov 10, 2020 · 15 revisions

Blocks are yöctọ code surrounded by brackets, { code }

These are associated with block functions, like conditionals and loops.

Block Functions

Use Fraction String List Observations
? {code}? if pop
  code
ibid. ibid. if-then
{c1}{c2}⁇ if pop
  c1
else
  c2
ibid. ibid. if-then-else
F {code}F a = pop
for ï = 0..a-1
  push ï
  code
NA pop a
for ï in a
  push ï
  code
for/for-each loop
progress variable ï can be used inside
G {code}G a = pop
for ï = a-1..0
  push ï
  code
NA pop a
for ï in invert(a)
  push ï
  code
inverted for loop
progress variable ï can be used inside
W {code}W while pop
  code
ibid. ibid. while loop

Notes:

  • A non-zero Fraction, any non-empty string, and non-empty lists are considered True
  • Blocks allow internal blocks
Clone this wiki locally