Jump to content

Monads/Writer monad: Difference between revisions

Line 37:
 
// DERIVE LOGGING VERSIONS OF EACH FUNCTION
 
function loggingVersion(f, strLog) {
return function (v) {
Line 68:
// to the contents of a wrapped value
// and return a wrapped result (with extended log)
 
// Writer a -> (a -> Writer b) -> Writer b
function writerBind(w, f) {
Line 90:
 
var half_of_addOne_of_root = function (v) {
return logCompose([log_half, log_addOne, log_root], v);
};
 
9,659

edits

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