Monads/Writer monad: Difference between revisions

Content added Content deleted
(J draft)
Line 94:
 
log_half = loggingVersion(half, "divided by 2");
 
 
 
Line 131 ⟶ 130:
// and then nests function applications (working from right to left)
function logCompose(lstFunctions, value) {
return lstFunctions.reduceRight(
.reduceRight(function (writerAwriterBind, f) {
return writerBindwriterUnit(writerA, fvalue);
}, writerUnit(value));
}