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

auto-mempty #25

Open
gelisam opened this issue Aug 10, 2013 · 0 comments
Open

auto-mempty #25

gelisam opened this issue Aug 10, 2013 · 0 comments

Comments

@gelisam
Copy link
Collaborator

gelisam commented Aug 10, 2013

It's a bit sad that #24 will fail if there are zero lines. Maybe we could detect whether the output type is an instance of Monoid, and start the fold with mempty if that is the case?

At the very least, we should detect (+) and (*) as a special case and start the fold at 0 and 1, respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant