Notice the require, which opens the trace library and the trace, which allows us to see the calls to factorial.
(#%require racket/trace) ; 6! = 6 * 5 * 4 * 3 * 2 * 1 = 6 * 5! ; n! = n * (n-1) * (n-2) * ... * 1 = n * (n-1)! ; 1! = 1, 0! = 1 ; A recursive procedure has two properties: ; 1. It calls itself to solve a problem (recursive call) ; 2. It has a place to stop (base case) (define (factorial n) (cond ((< n 2) 1) (else (* n (factorial (- n 1)))))) (trace factorial)