by Waterluvian · 10y ago · 0 comments
I will say though for the exact cases you mention, they probably should be clear why this isn't exactly the concept as described.
Haskell the language also knows nothing at all about invariants, and the language will happily let you make something a Monad even if it doesn't obey the right laws. The culture and libraries of course take invariants quite seriously, but some aspects of the Javascript culture also take invariants quite seriously, like Promises for example.