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

interleave() #150

Open
sanmai opened this issue Jun 15, 2024 · 0 comments
Open

interleave() #150

sanmai opened this issue Jun 15, 2024 · 0 comments
Labels
feature-request Feature request

Comments

@sanmai
Copy link
Owner

sanmai commented Jun 15, 2024

$numbers = Pipeline\fromArray([1, 2, 3]);
$letters = Pipeline\fromArray(['a', 'b']);

$interleaved = $numbers->interleave($letters);

// Output: 1, a, 2, b, 3
foreach ($interleaved as $item) {
    echo $item . ', ';
}
@sanmai sanmai added the feature-request Feature request label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Feature request
Projects
None yet
Development

No branches or pull requests

1 participant