Explore >> Select a destination


You are here

blog.cofree.coffee
| | blog.drewolson.org
7.9 parsecs away

Travel
| | I was recently building a Slack bot in Haskell. The core of the Slack integration was a never-ending loop that read messages from a web socket and performed actions based on the message. But how should I go about looping forever in Haskell? My first pass was to use the aptly-named forever function. My understanding of forever was that it ran a provided IO action over and over (this understanding was incomplete, we'll get to that). My initial code looked vaguely like this:
| | kndrck.co
2.9 parsecs away

Travel
| | Prelude State monads, introduced to me during the data61 functional programming course was one of my most memorable encounter with a monad. This was mainly because things only started to clicked and made a tiny bit of sense after a couple of weeks of frustration. This article is my attempt to explain the underlying mechanics of the State Monad to try and relief the frustration of whomever who was in my position.
| | jaspervdj.be
4.9 parsecs away

Travel
| | Personal home page and blog of Jasper Van der Jeugt.
| | yepoleb.github.io
51.2 parsecs away

Travel
|