Last active
May 20, 2023 10:49
-
-
Save nbness2/6e35484a245abc5eaf631657a5b3d7a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <I: Item> ItemContainer<I>.nbPartitionShift(predicate: (I) -> Boolean = Item::isInvalidItem) { | |
items | |
.partitionJoin(predicate) | |
.forEachIndexed { idx, item -> set(idx, item) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment