ghc-zero
Semigroups with absorption
'Monoid' is a 'Semigroup' glued with a neutral element called 'mempty'. In the same idea, 'Zero' is a 'Semigroup' glued with an absorbing element called 'zero'. Keep in mind that 'Zero' requires 'Semigroup'. If you have 'Semigroup' defined to work with 'Monoid', you might end up with no way to implement 'Zero'. That’s why the 'Semigroup' instance for 'Maybe' is confusing, because it relies on 'Monoid', and cannot be used with 'Zero'. 'Success' is the 'Zero' equivalent of 'Maybe' + 'Monoid'.
BSD-3-Clausecloud_download Downloads
To download packages, you need to log in and have a valid subscription.
Please select a product to see the available package versions:
Loading...
Loading package downloads...