`Monoid(undefined)` should be handled according to the rules on the Monoid
dalefrancis88 opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
A question was raise #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
Code
Additional context
yeah I suppose the alternative would be mapping over the input with some function that coerces for you