Jump to content

Monads/Writer monad: Difference between revisions

Line 439:
 
println("$a => $b => $c")
println(bind(f2, "after plus 8", bind(f1, "after times 7", unit(3, "after intialization"))))
</lang>{{out}}
<pre>
after intialization: 3 => after intialization, after times 7: 21 => after intialization, after times 7, after plus 8: 29
after intialization, after times 7, after plus 8: 29
</pre>
 
4,105

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.