Comment

Comment by oblio

I'm still kind of having problems with monads. Funnily enough, I recently found an article explaining what monoids are: https://fsharpforfunandprofit.com/posts/monoids-without-tear...

    You start with a bunch of things, and some way of combining them two at a time.

    Rule 1 (Closure): The result of combining two things is always another one of the things.

    Rule 2 (Associativity): When combining more than two things, which pairwise combination you do first doesn't matter.

    Rule 3 (Identity element): There is a special thing called "zero" such that when you combine any thing with "zero" you get the original thing back.


    With these rules in place, we can come back to the definition of a monoid. A "monoid" is just a system that obeys all three rules. Simple!
Long explanation overall in the article, but based on 6th grade math. I understood it, and it stuck. Could someone extend the monad explanation from here? Maybe I'll finally get it :)
parent oblio 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton