Haskell Language Free (Writer w) ~~ Writer [w]


Example

Given

data Writer w a = Writer w a

we have

data Free (Writer w) a
     = Pure a
     | Free (Writer w (Free (Writer w) a))

which is isomorphic to

data ProgLog w a
     = Done a
     | After w (ProgLog w a)

or, equivalently, (if you promise to evaluate the log first), Writer [w] a.