Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "partition"

Index

Functions

Functions

partition

  • partition<T>(this: Sequence<T>, predicate: function): object
  • Evaluates the given predicate for each element of the sequence and assorts each element into one of two lists according to the result of the predicate. Returns both lists as an object.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: function
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns object

    • false: Array<T>
    • true: Array<T>