RosettaCodeData/Task/Monads-Writer-monad/Factor/monads-writer-monad.factor
2023-07-01 13:44:08 -04:00

9 lines
244 B
Factor

USING: kernel math math.functions monads prettyprint ;
FROM: monads => do ;
{
[ 5 "Started with five, " <writer> ]
[ sqrt "took square root, " <writer> ]
[ 1 + "added one, " <writer> ]
[ 2 / "divided by two." <writer> ]
} do .