Consider the factorial
function defined in Section 2.3 and
evaluate factorial 5
. Five continuations must be formed during
this evaluation. They are:
c1 =: monad define'5 * y.' c2 =: monad define'4 * y.' c3 =: monad define'3 * y.' c4 =: monad define'2 * y.' c5 =: monad define'1 * y.'
Then the value of factorial 5
may be written as
c1 c2 c3 c4 c5 1