Finds the positions of element which satisfies pred in the list. If the list is infinite, this will hang forever.
pred
The match condition of element to find.
The found positions.
const list = fromArray([1, 4, 2, 3, 5]);expect(findIndices((x: number) => 4 <= x)(list)).toStrictEqual([1, 4]);expect(findIndices((x: number) => 0 <= x)(list)).toStrictEqual([0, 1, 2, 3, 4]);expect(findIndices((x: number) => 8 <= x)(list)).toStrictEqual([]); Copy
const list = fromArray([1, 4, 2, 3, 5]);expect(findIndices((x: number) => 4 <= x)(list)).toStrictEqual([1, 4]);expect(findIndices((x: number) => 0 <= x)(list)).toStrictEqual([0, 1, 2, 3, 4]);expect(findIndices((x: number) => 8 <= x)(list)).toStrictEqual([]);
Finds the positions of element which satisfies
predin the list. If the list is infinite, this will hang forever.