RecallWeave

Computer science / a visible execution

Calls go down.
Answers come back.

A recursive call leaves unfinished work behind. Follow each frame, watch a child return, and see how a fresh cache changes repeated Fibonacci calls.

Choose a whole number from 0 to 10. Editing the setup clears the current trace. Every run starts fresh.

Factorial · n = 4Before first call
Step 0
start

Before the first call.

Calls entered
0
Computed calls
0
Cache hits
0
Calls returned
0
Active depth
0
Maximum depth
0

Active call stack

0 active frames

The newest frame is on top. Each caller keeps its own input and returned child values.

    Traced algorithm

    Pseudocode. The highlighted line belongs to the selected event.

      Final result

      A result appears when the root returns.

      pending

      Cache

      Saved results belong to this run only.

        Returned values

        0 returned

        Actual return order through this step, earliest first. Select a value to inspect that return.

          Follow the execution

            What do the counters mean?
            Calls entered
            Every invocation reached through this step, including base cases and cache hits.
            Computed calls
            Calls entered that are not cache hits, including base cases. This does not count arithmetic operations or measure elapsed time.
            Cache hits
            Invocations served by a value already saved during this run.
            Calls returned
            Invocations that have delivered a result and left the stack.
            Active / maximum depth
            Current / largest number of simultaneous frames through this step, including root and base-case calls.

            Factorial has only the zero base case: factorial(0) = 1. Fibonacci uses F(0) = 0 and F(1) = 1, evaluates the left child first, and memoized runs cache every computed result including bases. Inputs are bounded to 0–10; result arithmetic is exact.

            Make the connection

            Explain the work a caller keeps.

            Pause before a child returns. Which operation is unfinished in its caller? Then compare Fibonacci with and without memoization at the same input. The original course asks twelve questions about base cases, suspended work, depth, and reuse.

            The trace file contains the full exact trace plus your selected step and displayed state. It is an inspection record, separate from RecallWeave’s learner-answer archives. The course file opens through Bring your own lesson in RecallWeave; preview it, then select Start this deck. The worked guide includes explanations and transfer prompts.