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

Feature: MapInterface#toMergedOrderedList #168

Open
boesing opened this issue Jun 3, 2022 · 0 comments
Open

Feature: MapInterface#toMergedOrderedList #168

boesing opened this issue Jun 3, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@boesing
Copy link
Owner

boesing commented Jun 3, 2022

$list = new GenericOrderedList([1, 2, 3, 4]);
$grouped = $list->group(static fn (int $value) => $value % 2 === 0 ? 'even' : 'odd');
$listFromGroups = $grouped->toMergedOrderedList();
$list->toNativeArray(); // [1, 3, 2, 4] or sth. like this - re-ordering to the initial order won't really work here and thus I guess that should be sufficient
@boesing boesing added the enhancement New feature or request label Jun 3, 2022
@boesing boesing added this to the 2.0.0 milestone Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant