Monads/Writer monad: Difference between revisions

Content added Content deleted
No edit summary
Line 79:
}
 
// We can compose a chain of safeWriter functions (of any length) with a simple foldr/reduceRight
// which starts by 'lifting' the initial value into a Writer wrapping,
// and then nests function applications (working from right to left)