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

Technically the third has no variables...

Slightly less wise-ass, I couldn't come up with a use case for this code that'd give sane variable names. Third attempt:

    sum $ do 
        (element, True) <- results
        guard (odd element)
        return element
That's pretty far from imperative languages, though, which I kind of tried to avoid.


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

Search: