- factorial nprocedure
Memoized implementation of the factorial method. Provides O(n) computation, albeit with an O(1) average case. Requires O(n) memory.
You may reset the memory by whiping out the cache: (set! factorial* (make-vector 1 1))
Memoized implementation of the factorial method. Provides O(n) computation, albeit with an O(1) average case. Requires O(n) memory.
You may reset the memory by whiping out the cache: (set! factorial* (make-vector 1 1))