MCPcopy Index your code
hub / github.com/Effect-TS/effect / parserMap

Function parserMap

packages/printer/src/internal/docTree.ts:380–381  ·  view source on GitHub ↗
(self: DocTreeParser<S, A>, f: (a: A) => B)

Source from the content-addressed store, hash-verified

378const parserSucceed = <S, A>(value: A): DocTreeParser<S, A> => (stream) => Option.some([value, stream] as const)
379
380const parserMap = <S, A, B>(self: DocTreeParser<S, A>, f: (a: A) => B): DocTreeParser<S, B> => (stream) =>
381 Option.map(self(stream), ([a, s]) => [f(a), s] as const)
382
383const parserFlatMap =
384 <S, A, B>(self: DocTreeParser<S, A>, f: (a: A) => DocTreeParser<S, B>): DocTreeParser<S, B> => (stream) =>

Callers 2

treeFunction · 0.85
parserFunction · 0.85

Calls 2

mapMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected