3 ms·
What monad would you use them for? I've never seen a really good use case.
by hesselink 15y ago
What monad would you use them for? I've never seen a really good use case.
- ourfrank 15y agoProbably the Maybe monad most often, in usual code. Or really as a shorter way of writing any smaller monadic code blocks. I really look forward to using this new feature.
- danieldk 15y agoI don't know for sure until I try, but I think can be useful for logic monads.
- jerf 15y agoI think LINQ is a special case of a monad comprehension. Syntax checked, type checked, composeable query languages (of which the "Structured" Query Language is only one example) are good things. So far everywhere where I might have been tempted to use a Maybe monad comprehension, applicative functors were more clear anyhow.
- samg_ 15y agoYou are right about query languages being a good for for monad comprehensions. See Torston Grust's dissertation[1], specifically "Combinators from Monad Comprehensions." 1. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.88.9148 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.88.9...