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

This is probably the clearest explanation of what a monoid is that I've seen. Basically, a monoid is a reduction function that takes multiple inputs of type A and returns a single output of type A. The only caveats on top are that type A must support the concept of an empty value, combining the empty value with x results in x, and that combinations are associative.


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

Search: