MCPcopy
hub / github.com/Effect-TS/effect / parserSucceed

Function parserSucceed

packages/printer/src/internal/docTree.ts:378–378  ·  view source on GitHub ↗
(value: A)

Source from the content-addressed store, hash-verified

376}
377
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)

Callers 1

treeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected