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

Update "flatten" to be more versatile #4

Merged
merged 2 commits into from
Mar 23, 2024
Merged

Conversation

theMagicalKarp
Copy link
Owner

What

Update the flatten function to accept more than one iterable at a time, enhancing its versatility. This improvement enhances overall usability while ensuring backward compatibility.

items := itertools.Flatten(
	iter.New(
		iter.New(1, 2, 3),
		iter.New(4, 5, 6),
	),
	iter.New(
		iter.New(7, 8, 9),
	),
)
itertools.Print(items)
// Output:
// 1, 2, 3, 4, 5, 6, 7, 8, 9

@theMagicalKarp theMagicalKarp merged commit 0b10d80 into main Mar 23, 2024
2 checks passed
@theMagicalKarp theMagicalKarp deleted the update-flatten branch March 23, 2024 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant