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

[Draft]Add a lazy split for Sequence and Collection #2193

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

greenthings
Copy link

Swift is a high-performance language known for its efficient operations. When applying methods like map and filter, Swift leverages lazy evaluation. For instance, we can use array.lazy.map() as an example. However, it's worth nothing that the split function currently lacks support for this feature.

"a.b.c".lazy.split(separator: ".")


```swift

"a.b.c".lazy.split(separator: ".")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"a.b.c".lazy.split(separator: ".")
"a,b,c".lazy.split(separator: ",")

really nit. maybe separator: , is more easy to understand for others?

@greenthings greenthings changed the title Add a lazy split for Sequence and Collection [Draft]Add a lazy split for Sequence and Collection Oct 27, 2023
@greenthings greenthings marked this pull request as draft October 27, 2023 14:37
@rjmccall rjmccall added the LSG Contains topics under the domain of the Language Steering Group label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LSG Contains topics under the domain of the Language Steering Group
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants