How to write a script
Settings go above ---. kind is stack, recurrence, iteration or substitution. Code lines start with > ; in a recurrence lesson add | cost after a line.
Below ---: ## Step title | subtitle starts a step, and a plain line goes on the board with an optional | note.
stack: @call fact(3) | text for the caller, @ret 6 | text for the caller, @hl 2 highlights code line 2.
recurrence: @cost 3 shows the cost of line 3.
iteration: set shape to chain, halve or split and n; @level adds one level, @levels adds the rest.
substitution: rec: 2*T(n/2) + n, base, points (pow2 or int), g, c, n0, xmax; actions @draw f, @draw cg, @mark n0, @shade.