tell adds a value to the output accumulated by WriterT while the computation continues. Its type is Monad m => w -> WriterT w m (). section 15.1.2
The collected output is combined as pieces arrive, so w typically needs Semigroup and Monoid instances. This separates reporting from the computation’s returned result. section 15.1.2
Collecting directories during traversal
With type App a = WriterT [FilePath] IO a, tell dirs records each directory list. Running runWriterT (example "foo") produces ((),["baz","bar"]).
