| 3980 | * @category collecting & elements |
| 3981 | */ |
| 3982 | export const filter = <A, E, R>(iterable: Iterable<A>, f: (a: NoInfer<A>) => Micro<boolean, E, R>, options?: { |
| 3983 | readonly concurrency?: Concurrency | undefined |
| 3984 | readonly negate?: boolean | undefined |
| 3985 | }): Micro<Array<A>, E, R> => |
| 3986 | filterMap(iterable, (a) => |
| 3987 | map(f(a), (pass) => { |
| 3988 | pass = options?.negate ? !pass : pass |
| 3989 | return pass ? Option.some(a) : Option.none() |
| 3990 | }), options) |
| 3991 | |
| 3992 | /** |
| 3993 | * Effectfully filter the elements of the provided iterable. |