The Curious Time-Traveling Reverse State Monad
tech-blog.capital-match.com
tech-blog.capital-match.com
More colorfully, in `State RiemannHypothesisProof`, Haskell Scientists begin by reading the state (which comes from the future), pass it along, and then (in the future) set the state, which they received as an input from the past.
It is a somewhat common thing to use a 'TardisT' monad (combination of reverse and forward state monads) to write assembler-like things, with fixups. The fixups travel backwards, and the generated code travels forward. This terminates, as long as you never examine the generated code when generating the fixups.