2 ms·
As the sibling says, your code's a little off; but the approach of "they're just an interface" is the way I think of them too. We shouldn't forget the associat
by chriswarbo 5y ago
As the sibling says, your code's a little off; but the approach of "they're just an interface" is the way I think of them too.
We shouldn't forget the associated "functor laws" and "monad laws", but they're pretty intuitive and not much different than more mainstream rules; e.g. a 'Serialize' interface might have a "law" like 'Serialize.load(Serialize.save(x)) == x'