Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's unimportant, but the recently reintroduced 'monad comprehensions' bring out some nice features of this approach:

      fluStatusGivenPositiveTest = [fluStatus | fluStatus <- percentWithFlu 10
                                              , testResult <- testRate fluStatus
                                              , testResult == Pos]
        where testRate Flu     = percentPositive 70
              testRate Healthy = percentPositive 10


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: