(self: DocTreeParser<S, A>, f: (a: A) => DocTreeParser<S, B>)
| 382 | |
| 383 | const parserFlatMap = |
| 384 | <S, A, B>(self: DocTreeParser<S, A>, f: (a: A) => DocTreeParser<S, B>): DocTreeParser<S, B> => (stream) => |
| 385 | Option.flatMap(self(stream), ([a, s1]) => f(a)(s1)) |
| 386 | |
| 387 | function many<S, A>(parser: DocTreeParser<S, A>): DocTreeParser<S, ReadonlyArray<A>> { |
| 388 | return (stream) => |