Yesterday I read up some on the whole monad thing. I by no means grasp it, but it will not stop me from trying to use it. Some of the answers in this question really do push that monads is there to make things nicer, and more readable. 'Haskell has nice support for monads', does that mean that I can write nice code with for example maybe out of the box?
Or does it mean that I can write code for the maybe type which makes it easy to use.
I encountered the following problem when doing advent of code:
Add 1 to the values in two Maybes and then multiply them together.
After reading question on multiplying two maybes and also checking out typeclassopedia I arrived at (after some serious head scratching):
let test = Just (*) <*> ((+1) <$> marker1Pos) <*> ((+1) <$> marker2Pos)
It works, but to me that looks less than ideal.
Can I do it with a do-block which I read about in the first link?