Skip to content

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