runWriter package:fused-effects

Run a Writer effect with a Monoidal log, applying a continuation to the final log and result.
runWriter k (pure a) = k mempty a
runWriter k (tell w) = k w ()
runWriter k (listen (tell w)) = k w (w, ())
runWriter k (censor f (tell w)) = k (f w) ()
Run a Writer effect with a Monoidal log, producing the final log alongside the result value.
runWriter (tell w) = pure (w, ())
runWriter (pure a) = pure (mempty, a)