Follow the active frame. Give each return its proper place.
Ready for its next line.
Only the active frame runs. Waiting callers keep their own values.
The caller waits while the new frame takes its turn. Its local values stay safe.
Return to the original caller to reveal it.
Read the highlighted line and choose its next action.
This frame has no offered action here. Choose All frames to see the next cues.
Inspect a frame, follow the script, and choose the next cue.
Help Framelet direct a tiny program. Each function call has its own frame, arguments and local values. Follow the highlighted line, then choose what the interpreter does next.
The top frame runs. Waiting callers keep their values and a place for the result they need.
A call adds a fresh frame. A return removes the current frame and sends its value to the waiting caller’s pending expression.
Select the correct frame, argument or returned value. Finish the scene when the original call returns its final output.
Tap a 3D frame to inspect its own locals and see its offered actions. Use All frames to show every option again. Each action has a number for the keyboard.
3 stars: no missed cues or hints. 2 stars: up to two missed cues, no hints. 1 star: every completed scene. Undo and restart preserve missed cues and hint use; your best stars are saved when browser storage is available.
A call stack keeps track of function calls. Calling a function creates a new frame; that frame runs while its caller waits. When it returns, its frame leaves the stack and execution resumes in the caller.
Recursion is a function calling itself. Each invocation has its own arguments and locals. A base case returns without making another recursive call, allowing the waiting calls to finish.
The theater uses a small, language-neutral pseudocode with whole-number arithmetic. IF tests are resolved before the highlighted call or return cue. Expressions are evaluated from left to right. A waiting expression keeps its earlier result while it waits for another call.
Programs here are bounded and terminate. The theater shows at most five simultaneous frames as a teaching rule; real programming environments have their own stack limits. There are no asynchronous callbacks in these scenes.
Programming references: MDN’s Call stack and Recursion.
Framelet, the theater and frame props are original Blender models. Sound effects: Kenney Interface Sounds (CC0). Runtime: Three.js (MIT). Fonts: Fredoka, IBM Plex Mono and DM Sans, Google Fonts.
60 scenes in each of three courses, for 180 scenes total.