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

many1 should return NonEmptyList #36

Closed
rightfold opened this issue Apr 26, 2017 · 3 comments
Closed

many1 should return NonEmptyList #36

rightfold opened this issue Apr 26, 2017 · 3 comments

Comments

@rightfold
Copy link

rightfold commented Apr 26, 2017

This makes the image closer to the codomain and is therefore easier and safer to use. Especially useful with the common use case of using foldl1 or foldr1 on the result.

@newlandsvalley
Copy link
Contributor

newlandsvalley commented Jul 3, 2017

Also the other combinators that parse one or more values - many1Till, sepBy1 etc. I have a prototype implementation - https://github.com/newlandsvalley/purescript-school-of-music/blob/master/src/Data/Euterpea/DSL/ParserExtensions.purs. Does backward compatibility prevent the direct replacement? Incidentally, I couldn't find foldr1 in Pursuit although foldl1 was there.

@justinwoo
Copy link
Collaborator

Fixed by #41 right? Could be closed probably

@hdgarrood
Copy link
Contributor

This was indeed fixed by #41, thanks @justinwoo

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

No branches or pull requests

4 participants