Lab · c01.s02.L1
Recursion tracer
Repeating a step beats a single delegating pass only when the repetition keeps its whole state in a fixed number of values, so it can be paused and resumed.
Question: When does repeating a step beat doing it once?
Frame 1 of 11: Move 0 — the twelve rowsBefore the first call. The twelve recorded charges sit in row order, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0 and 4, and their total is 7. The delegating panel has opened no bracket, and the repeating panel's card has nothing written on it.
Move 0 — the twelve rows. Before the first call. The twelve recorded charges sit in row order, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0 and 4, and their total is 7. The delegating panel has opened no bracket, and the repeating panel's card has nothing written on it.
Keyboard: Space plays or pauses, Left and Right step, Home goes to the first frame, End goes to the last frame.
Text description of this lab
Two panels total twelve charges, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0 and 4, and both end at 7. The left panel, in round brackets, opens one waiting addition per row until twelve are stacked, then collapses them from the inside out. The right panel, in square brackets, keeps only a counter and a running total: two numbers on a card, grown left to right. Paused, only the card's two numbers carry on.
Return to the section that hosts this lab
Caption status: re-simulated. Every lab declares one of published, re-simulated, schematic, synthetic or interpolated.