-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
adds the nth
function for iterables
#56580
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
Merged
Merged
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
b565783
adds `nth` function to iterators plus tests
ghyatzo ed7a984
removed useless module annotations
ghyatzo 1bfc080
fix one based indexing, more generic
ghyatzo b3fca0b
fix: simpler generic-based indexing
ghyatzo 26913e6
feat: adds the fix2 wrapper.
ghyatzo 53b58f2
fix: better wording for the fix2 version
ghyatzo 97f8104
considerably cleaner implementation based on first(drop)
ghyatzo 1bd0cdb
fix tests
ghyatzo 7422eca
Update iterators.jl
ghyatzo c49db01
fix doctests
ghyatzo 4e49673
Apply suggestions from code review
ghyatzo 0082a01
shorten doc of single argument, and fix doctests
ghyatzo 6a6cfa1
remove `@inline`s
ghyatzo 111a7e7
add back line importing MODULE macro and parentmodule
ghyatzo eb605f2
remove unneeded specializations, throw the same error as `first(drop())`
ghyatzo 320a7d4
clean up tests and adds a few test cases
ghyatzo 8e76592
* decouple `nth` from `first` and `drop`, by manually write the unrol…
ghyatzo 8be01c0
* adds test to correctly throw on negative indices
ghyatzo 9afd84f
remove ifelse, use normal ternary
ghyatzo 11ebb19
fix tests to check for bouds error instead of argument error
ghyatzo 1bcaf4a
fix leftover
ghyatzo cff3b83
added tests for sizeunknown path for cycles
ghyatzo 0b05ca0
fix tests
ghyatzo 3e522c7
reintroduce the traits methods to dispatch on iteratorsize instead of…
ghyatzo 5269053
Update base/iterators.jl
ghyatzo 5d26214
update NEWS.md file
ghyatzo 0cbf637
Merge branch 'master' into nth-api
ghyatzo 6f76d64
Fix NEWS.md
ghyatzo 1d14912
Merge branch 'master' into nth-api
DilumAluthge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.