arrays.d.ts
 1  /**
 2   * Map a function over an array and concatenate the results
 3   */
 4  export declare function flatMap<T, U>(xs: T[], fn: ((x: T, i: number) => U[])): U[];
 5  /**
 6   * Flatten a list of lists into a list of elements
 7   */
 8  export declare function flatten<T>(xs: T[][]): T[];
 9  /**
10   * Partition a collection by removing and returning all elements that match a predicate
11   *
12   * Note: the input collection is modified in-place!
13   */
14  export declare function partition<T>(collection: T[], pred: (x: T) => boolean): T[];