import Control.Monad.Writer example :: Writer [Int] String example = do tell [1..5] tell [6..10] return "foo"