3 ms·
I mean as someone who was not into this but became into this when I started Haskell, it's because as you play with things it becomes obvious that things behave
by anon291 2y ago
I mean as someone who was not into this but became into this when I started Haskell, it's because as you play with things it becomes obvious that things behave similarly.
For example, you learn addition and multiplication with numbers for dealing with real world quantities.
Then you mess with Booleans for computers. You'll notice that there's a distributive law for those as well as numbers and in this that or behaves like addition and and behaves like multiplication.
So then one thinks why that's the case (hint: it has to do with zero and one)
And as you do this you think... Well what else has things that behave this way.
And then you're like... Well what if you don't have multiplication, then what? And it goes on and on.
It's the same thing as when you're writing code and you notice two classes have similar functionality so you create a base class. Same idea . Different terminology