Writing a Game in Haskell: Lenses and the State Monad

Dies ist ein vergangenes Event

21 Personen haben teilgenommen

Bild des Veranstaltungsortes

Details

Moritz Drexl

Since Haskell is a pure language, many people think it's very hard/impossible to write programs with a complex state, like games. This is not true, and with the combination of the state monad and lenses one can in fact write very elegant, concise and powerful stateful code.

I will give a brief intuition for what a lens (and a prism and a traversal) is, and how to effectively use them in the state monad.

Then we will all apply our insights by hacking on a small ncurses terminal game!

Location und Getränke werden freundlicherweise vom Data Science-Team der codecentric AG gestellt.