(n: number)
| 167 | |
| 168 | /** @internal */ |
| 169 | export const collectAllToSetN = <In>(n: number): Sink.Sink<HashSet.HashSet<In>, In, In> => |
| 170 | foldWeighted<HashSet.HashSet<In>, In>({ |
| 171 | initial: HashSet.empty(), |
| 172 | maxCost: n, |
| 173 | cost: (acc, input) => HashSet.has(acc, input) ? 0 : 1, |
| 174 | body: (acc, input) => HashSet.add(acc, input) |
| 175 | }) |
| 176 | |
| 177 | /** @internal */ |
| 178 | export const collectAllUntil = <In>(p: Predicate<In>): Sink.Sink<Chunk.Chunk<In>, In, In> => { |
nothing calls this directly
no test coverage detected