-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add cons pattern matching for IEnumerable<T> #36
Comments
DavidArno
added a commit
that referenced
this issue
May 30, 2017
This is taking a TDD approach, so code is currently written to make the tests pass and needs refactoring.
DavidArno
added a commit
that referenced
this issue
Jun 9, 2017
DavidArno
added a commit
that referenced
this issue
Jun 27, 2017
Reverted the changes made on the master branch for this new feature; Created new v3.1.0 branch; Re-instated those changes on that latter branch.
DavidArno
added a commit
that referenced
this issue
Aug 6, 2017
Additionally, some tidy up, switching code to take advantage of throw expression bodies and local functions.
DavidArno
added a commit
that referenced
this issue
Aug 6, 2017
DavidArno
added a commit
that referenced
this issue
Aug 9, 2017
Added to v3.1. Still needs documenting though. |
Moved to the v4 milestone as the documentation for this will be released with that release. |
v4 is released, but it still needs documenting. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requiring
Cons().Do()
to recursively process the collection would be very inefficient. SoRecurseTail
method will be available to allow the collection to be iterated over:My initial thoughts on how to best handle this, if
RecurseTail
is used, then we iterate over the elements, storing them in eg a stack and then pop them off one at a time, applying theSingle
match to the last item, andCons
matches to everything else to arrive at a final result.Not sure yet if an
Action
version is even needed.The text was updated successfully, but these errors were encountered: