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

This is a nice clean criterion, but it's still pretty unclear to me why the zero element of a monoid should be considered falsey at all.


Because when writing a recursive function, the zero element is generally the base case.

    if x:
        <destructure x, recurse on subparts>
    else:
        return <something>
This applies to (natural) numbers as well--'destructuring' usually means decrementing the number.




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

Search: