Skip to content

Implement summary.isPartitioned() #72

@Smoren

Description

@Smoren

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

PHP implementation example

Needs to be implemented:

  • summary.isPartitioned()
  • summary.isPartitionedAsync()
  • Stream.isPartitioned()
  • AsyncStream.isPartitioned()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions