The Tardis Monad
hackage.haskell.org
The Tardis Monad
1–10 of 10 posts
Re: The Tardis Monad
#2Re: The Tardis Monad
#3[1] https://github.com/ElementsProject/simplicity/blob/35627fc49...
Re: The Tardis Monad
#4Re: The Tardis Monad
#5Re: The Tardis Monad
#6Re: The Tardis Monad
#7Re: The Tardis Monad
#8what the heck is the reverse state monad
Re: The Tardis Monad
#9People often say state is hard in functional programming, but things like the Tardis monad have convinced me that (semantically speaking) functional programming is even better at state than the imperative/OOP paradigms. Imperative programs are essentially restricted to one global monad implicitly hardcoded into the language semantics, whereas with functional programming you have the freedom to choose the most appropr…
I've been reading about effectful systems that would remove the pain points around transformers all the way back to 2016, or earlier. Yet there still doesn't seem to be any to overtake the library ecosystem.
Of course this is where the "write your own custom monad"/free monad interpreter might come into play in practice.
Re: The Tardis Monad
#10https://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