Search Results

Search found 1 results on 1 pages for 'arrowdodger'.

Page 1/1 | 1 

  • What advantage does Monad give us over an Applicative?

    - by arrowdodger
    I've read this article, but didn't understand last section. The author says that Monad gives us context sensitivity, but it's possible to achieve the same result using only an Applicative instance: let maybeAge = (\futureYear birthYear -> if futureYear < birthYear then yearDiff birthYear futureYear else yearDiff futureYear birthYear) <$> (readMay futureYearString) <*> (readMay birthYearString) It's uglier for sure, but beside that I don't see why we need Monad. Can anyone clear this up for me?

    Read the article

1