A strict state monad with a notion of time travel