Initial pass at a Writer monad.
State monad has its own StateResult type
z