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

Implement fold and try_fold using NomBounds #1436

Closed
wants to merge 4 commits into from
Closed

Implement fold and try_fold using NomBounds #1436

wants to merge 4 commits into from

Conversation

Stargateur
Copy link
Contributor

@Stargateur Stargateur commented Oct 23, 2021

This is yet another way to Closes #1393 I like this very much I found it's like a fusion of #1402 and #1407

It's hard to tell what implementation is faster between the 3 implementations, I think we need a benchmark, I expect #1407 faster than this faster than #1402 but anyway could be wrong and bench != real world application.

I'm still not a big fan to check #1333 at least in the current state, I think it's should be user problem, but I did it anyway as a PoC.

Todo:

  • fold
  • try_fold
  • many with extend
  • usize for NomBounds
  • doc
  • tests
  • benchmark 3 solutions (+1 old fold_many_n_m)

PS: ControlFlow is stable since 1.55 but I don't expect the range feature for any soon so will maybe fix if needed when the time will come.

@cenodis @epage

@coveralls
Copy link

coveralls commented Oct 23, 2021

Coverage Status

Coverage decreased (-0.9%) to 83.091% when pulling 26f57ac on Stargateur:range_v2 into d15a266 on Geal:master.

@Stargateur Stargateur closed this Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate parser variants using ranges (e.g. many0, many_m_n)
2 participants