3 ms·
So, it'd require making any code that calls the function doing the logging do one of two things: 1. Explicitly end the scope of implicitly logging things by c
by Tyr42 12y ago
So, it'd require making any code that calls the function doing the logging do one of two things:
1. Explicitly end the scope of implicitly logging things by calling runWriter, and getting a pair of (result, log) out.
2. Continue working in the implicit log monad, which would mostly involve extracting the result of the log function with `do x <- theLoggingThing`, but you can still mix in pure statments with `do let y = 5` or other function calls, and then end the do block with `return val`, where val was what you were going to return before.