Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monoid(undefined) should be handled according to the rules on the Monoid #371

Open
dalefrancis88 opened this issue Feb 14, 2019 · 1 comment
Labels
breaking enhancement needs work The issue itself needs more details before it can be worked on

Comments

@dalefrancis88
Copy link
Collaborator

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

@dalefrancis88 dalefrancis88 added enhancement breaking needs work The issue itself needs more details before it can be worked on labels Feb 14, 2019
@bennypowers
Copy link
Collaborator

yeah I suppose the alternative would be mapping over the input with some function that coerces for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking enhancement needs work The issue itself needs more details before it can be worked on
Projects
None yet
Development

No branches or pull requests

2 participants