Skip to content

Naming and program structure

5. Naming and program structure (since v0.0)

Section titled “5. Naming and program structure (since v0.0)”

A program is paper square followed by statements, executed top to bottom. A name must be defined before it is used.

  • Crease statement — binds a crease, or is anonymous; with @ it also folds (§4.6):
    --d1: through .a .c ; named precrease
    map .a onto .c ; anonymous precrease
    @map .a onto .c moving .a ; fold (valley)
  • Point statement — binds a derived point:
    .center: cross --d1 --d2
  • Flip statement (since v0.7-dev) — turns the sheet over (§4.7):
    flip

Derived points and named creases are usable in any later statement. ; begins a line comment.

Concrete syntax (keywords, sigils) is stable as of v0.0 but may still be revised before v1.0.