Settings

Theme

Time Travel in Haskell for Dummies

blog.csongor.co.uk

15 points by pr0crastin8 3 years ago · 4 comments

Reader

Sakos 3 years ago

Can somebody ELI5 this? I don't get it.

  • Throwaway234590 3 years ago

    This year's Advent of Code had a problem where you had to check the visibility of trees in a forest from both sides, (actually four sides, but consider two sides). You needed to read in an entire array of tree heights, and walk back from both sides into the centre to check if each tree was visible.

    Because Haskell reads in the entire array before beginning processing, you can create semantics that walk backwards and forwards to solve this problem all in one go. That is what the Tardis monad is about.

  • whateveracct 3 years ago

    Which part specifically?

    The article doesn't especially assume Haskell knowledge and even explains both thunks/laziness and the state monad from scratch.

    So I'm guessing there's just some small questions that can be answered and then the article will do the explaining. It would be silly to rewrite a worse explanation of Tardis instead of explaining the missing pieces to you :)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection