Category Archives: Development

Arrow talk

On the Stack Overflow site, I found a great question titled Monads vs. Arrows. Essentially the OP (original poster) asks: “… When should I use monads and when should I use arrows?”. I answered the question and since I believe … Continue reading

Posted in Development

Cheat sheet for Monads in Haskell

Let M be a Type Constructor, Functor, and Monad. As a Type Constructor, M can map a type a to the type M a. As a Functor, M can also map a function f to the function M f, using … Continue reading

Posted in Development

The most significant FAQs about Haskell

Question: Function application and composition versus bind (>>=) Answer: For the following discussion, a, b, and c are built in Haskell data types. We use normal function composition when we compose a function a -> b with a function b … Continue reading

Posted in Development

The examples in the Parsec users guide

Parsec is a free, industrial strength, monadic parser combinator library for Haskell, by Daan Leijen. You can find the users guide in the Parsec documentation. In this blog post, I am going to list the examples that Daan Leijen includes … Continue reading

Posted in Development

A mature look into Monads

In previous posts concerning Haskell, I have talked a lot about Monads. The monadic concept is one of the most important topics in Haskell. It is one of its cornerstones. It is what makes Haskell excel. It is what makes … Continue reading

Posted in Development

The IO Monad

It is time to study the most important and most intuitive Monad: the IO Monad. IO stands for Input/Output. IO is considered a side effect and it is treated as such. This is why Haskell has a Monad especially for … Continue reading

Posted in Development

Creating state with IORef

In my previous blog post, I wrote about the State Monad and how it cannot be used to create a stateful counter. Fortunately, there are many ways and additions in Haskell (like special libraries, etc.) that can be used to … Continue reading

Posted in Development