Monads/Writer monad: Difference between revisions
Content added Content deleted
Line 24: | Line 24: | ||
-- but return an output value which is paired with a log string ? |
-- but return an output value which is paired with a log string ? |
||
-- We can prevent functions which expect simple values from choking |
-- We can prevent functions which expect simple values from choking |
||
-- on log-wrapped output (from nested functions) |
|||
-- by writing Unit/Return() and Bind() for the Writer monad in AppleScript |
-- by writing Unit/Return() and Bind() for the Writer monad in AppleScript |
||