/** * Splits a collection into two groups, the first of which contains elements the * `predicate` type guard passes, and the second one containing the rest. * * @param data - The items to split. * @param predicate - A function to execute for each element in the array. It * should return `true` to add the element to the first partition, and and * `false` to add the element to the other partition. A type-predicate can also * be used to narrow the result. * @returns A 2-tuple of arrays where the first array contains the elements that * passed the predicate, and the second array contains the elements that did * not. The items are in the same order as they were in the original array. * @signature * R.partition(data, predicate) * @example * R.partition( * ['one', 'two', 'forty two'], * x => x.length === 3, * ); // => [['one', 'two'], ['forty two']] * @dataFirst * @category Array */ declare function partition(data: ReadonlyArray, predicate: (value: T, index: number, data: ReadonlyArray) => value is S): [Array, Array>]; declare function partition(data: ReadonlyArray, predicate: (value: T, index: number, data: ReadonlyArray) => boolean): [Array, Array]; /** * Splits a collection into two groups, the first of which contains elements the * `predicate` type guard passes, and the second one containing the rest. * * @param predicate - A function to execute for each element in the array. It * should return `true` to add the element to the first partition, and and * `false` to add the element to the other partition. A type-predicate can also * be used to narrow the result. * @returns A 2-tuple of arrays where the first array contains the elements that * passed the predicate, and the second array contains the elements that did * not. The items are in the same order as they were in the original array. * @signature * R.partition(predicate)(data) * @example * R.pipe( * ['one', 'two', 'forty two'], * R.partition(x => x.length === 3), * ); // => [['one', 'two'], ['forty two']] * @dataLast * @category Array */ declare function partition(predicate: (value: T, index: number, data: ReadonlyArray) => value is S): (data: ReadonlyArray) => [Array, Array>]; declare function partition(predicate: (value: T, index: number, data: ReadonlyArray) => boolean): (data: ReadonlyArray) => [Array, Array]; export { partition };