#lang racket ; Let's unwrap the generic formulation of above and write it directly (define fn-cc (lambda (x) (define fn-cc-r (lambda (x cc) (if (<= x 1) ; base case is 1 (cc 1) ; recursion is x * (fn(x-1)) (fn-cc-r (- x 1) (lambda (result) (cc (* x result)))) ) )) (fn-cc-r x (lambda (result) result)) ) (fn-cc 3)