Added zip() and enumerate() utility functions for iterators.#596
Closed
pao wants to merge 1 commit intoJuliaLang:masterfrom
Closed
Added zip() and enumerate() utility functions for iterators.#596pao wants to merge 1 commit intoJuliaLang:masterfrom
pao wants to merge 1 commit intoJuliaLang:masterfrom
Conversation
Member
Author
|
Yes, these are definitely inspired by Haskell and Python equivalents, respectively. Notably, Python isn't lazy, so these are implemented as generators, but using Tasks didn't occur to me when I wrote these. I ended up defining these then decided I didn't want to use them, but I figured it's the sort of thing people are going to want to reimplement all the time if they aren't in the standard library somewhere. Perhaps we should go back and lazy these up with Tasks, then? |
Member
Author
|
Looks like you already did enumerate(). Let's close this then. |
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this pull request
Oct 11, 2021
Co-authored-by: Dhairya Gandhi <dhairya@juliacomputing.com>
ViralBShah
added a commit
that referenced
this pull request
Feb 11, 2025
Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: 212981b New commit: 72c7cac Julia version: 1.13.0-DEV SparseArrays version: 1.12.0(Does not match) Bump invoked by: @ViralBShah Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@212981b...72c7cac ``` $ git log --oneline 212981b..72c7cac 72c7cac Explicitly declare type constructor imports (#598) ff083ce README: update github action badge (#596) ``` Co-authored-by: ViralBShah <744411+ViralBShah@users.noreply.github.com>
KristofferC
pushed a commit
that referenced
this pull request
Feb 11, 2025
Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: 212981b New commit: 72c7cac Julia version: 1.13.0-DEV SparseArrays version: 1.12.0(Does not match) Bump invoked by: @ViralBShah Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@212981b...72c7cac ``` $ git log --oneline 212981b..72c7cac 72c7cac Explicitly declare type constructor imports (#598) ff083ce README: update github action badge (#596) ``` Co-authored-by: ViralBShah <744411+ViralBShah@users.noreply.github.com> (cherry picked from commit ac79b9f)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I may not have selected the best types for these functions. If there's a more general iterable supertype we should probably use that instead.