Category Archives: 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 | Comments Off on The IO Monad

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 | Comments Off on Creating state with IORef

The disappointing State Monad

So far in my blog posts, we have encountered Monads and have studied them, in order to understand how they behave and how they work. But we have not seen real examples of real Monads in the real professional programming … Continue reading

Posted in Development | Comments Off on The disappointing State Monad

NumberMania solver

Main points NumberMania solver is an application I just finished creating, which helps you solve the NumberMania puzzles that the puzzles site Brain Teasers provides. The site also makes these puzzles available at its own community in Google plus named … Continue reading

Posted in Development | Comments Off on NumberMania solver

Evaluation of Skills

Main points “Evaluation of Skills” is test taking software that I developed for the evaluation of prospective and current employees and as an educational toy. You can download an evaluation version of Evaluation of Skills from the link. If you … Continue reading

Posted in Development | Comments Off on Evaluation of Skills

MasterMind solver

In July 2003, I wrote a blog post titled “An Excel VBA macro that solves MasterMind”. In that blog post, I presented a program that solved MasterMind. I wrote the program in VBA and it runs inside Excel. It is … Continue reading

Posted in Development | Comments Off on MasterMind solver

Trees as Monads

We first encountered trees in Haskell in my blog post titled “Trees in Haskell”. In that blog post we studied binary trees. Then we continued our study of binary trees in my blog post titled “Examples of Functors in Haskell”. … Continue reading

Posted in Development | Comments Off on Trees as Monads

The difference between function application and bind in Haskell

If you have read my blog posts so far, you will have understood the difference between normal function application in Haskell and the monadic bind (>>=). What I essentially talk about, is the difference between f x and x >>= … Continue reading

Posted in Development | Comments Off on The difference between function application and bind in Haskell

The List Monad

Like Maybe, [] is also a type constructor elevated into a Functor, Applicative, and Monad. The code that turns [] into a Functor follows: instance Functor [] where    fmap = map The previous code can be written equivalently: instance … Continue reading

Posted in Development | Comments Off on The List Monad

The Maybe Monad

Maybe is predefined and built in Haskell. Maybe is a type constructor whose definition is built-in as: data Maybe a = Nothing | Just a Its meaning as a type constructor is that Maybe accommodates cases where there might be … Continue reading

Posted in Development | Comments Off on The Maybe Monad