itertools-ts
itertools-ts copied to clipboard
Implement summary.isPartitioned()
Returns true if all elements of given collection that satisfy the predicate appear before all elements that don't.
- Returns true for empty collection or for collection with single item.
- Default predicate if not provided is the boolean value of each data item.
function *isPartitioned<T>(...iterable: Iterable<T> | Iterator<T>, predicate?: (datum: T) => boolean): boolean
Needs to be implemented:
-
summary.isPartitioned() -
summary.isPartitionedAsync() -
Stream.isPartitioned() -
AsyncStream.isPartitioned()