X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=list_monad_as_continuation_monad.mdwn;h=7a57ea7b73c5a9565f7644311ef8737f88200d4f;hp=200b4b0a9fd1ce1d65a28dbfffd33918c38f3cce;hb=d9bf1d89baaef4a0ceeb5c84db4d2a7172aaf400;hpb=a9fc616a72a86be53a9ce7289fa3608799b44956 diff --git a/list_monad_as_continuation_monad.mdwn b/list_monad_as_continuation_monad.mdwn index 200b4b0a..7a57ea7b 100644 --- a/list_monad_as_continuation_monad.mdwn +++ b/list_monad_as_continuation_monad.mdwn @@ -276,7 +276,7 @@ So if, for example, we let `k` be `+` and `z` be `0`, then the computation would right-fold + and 2+4+2+4+8+0 over [2] = 2+(2+4+(2+4+8+(0))) ==> right-fold + and 2+2+4+2+4+8+0 over [] = 2+(2+4+(2+4+8+(0))) -which indeed is the result of right-folding + and 0 over `[2; 2; 4; 2; 4; 8]`. If you trace through how this works, you should be able to persuade yourself that our formula: +which indeed is the result of right-folding `+` and `0` over `[2; 2; 4; 2; 4; 8]`. If you trace through how this works, you should be able to persuade yourself that our formula: fun k z -> u (fun a b -> f a k b) z