Is your feature request related to a problem? Please describe.
A question was raise https://github.com/evilsoft/crocks/issues/301 by @bennypowers. Floating the idea of m(nil) returning an empty for the monoid.
Describe the solution you'd like
We will need to consider the behaviour of each monoid but if undefined hits the monoid and it is not expected we should handle it accordingly. In the case of Any and All which utilize coercion, should coerce into a false. All other Monoid should throw if their carrier type cannot deal with the unit.
Describe alternatives for how you do this now
@bennypowers can you add here if you have any
Is your feature request related to a problem? Please describe. A question was raise https://github.com/evilsoft/crocks/issues/301 by @bennypowers. Floating the idea of
m(nil)
returning anempty
for the monoid.Describe the solution you'd like We will need to consider the behaviour of each
monoid
but ifundefined
hits themonoid
and it is not expected we should handle it accordingly. In the case ofAny
andAll
which utilize coercion, should coerce into afalse
. All otherMonoid
should throw if their carrier type cannot deal with the unit.Describe alternatives for how you do this now @bennypowers can you add here if you have any
Code
Additional context