Skip to content

Comment on The Tardis Monad

Comments

I just coded an example usage of this monad last week:

https://github.com/jasonincanada/kattis/blob/master/src/Pivo...

This tests each element of a list to see if it's a pivot, meaning it's between the maximum to the left and the minimum to the right. In a single logical traversal it shouldn't be able to see the minimum yet, since it hasn't visited those elements. With reverse state you pretend you can anyway and let Haskell figure out the dependencies during execution

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.