parserApplicative:object = {...parserFunctor,of: <A, E, C>(a: A): Parser<A, E, C> => from((_: C) => right(a)),ap: <A, B, E, C>(fab: Parser<(a: A) => B, E, C>, a: Parser<A, E, C>): Parser<B, E, C> =>from((o: C) => E.ap(a.runParser(o))(fab.runParser(o)))} as const
Type declaration
ap: function
ap<A, B, E, C>(fab: Parser<function, E, C>, a: Parser<A, E, C>): Parser<B, E, C>
parserFunctor:object = {URI,map: <A, E, B, C>(v: Parser<A, E, C>, f: (a: A) => B): Parser<B, E, C> => from((o: C) => E.map(f)(v.runParser(o)))} as const
Type declaration
URI: "Parser"
map: function
map<A, E, B, C>(v: Parser<A, E, C>, f: function): Parser<B, E, C>
parserMonad:object = {...parserApplicative,chain: <A, B, E, C>(fa: Parser<A, E, C>, afb: (a: A) => Parser<B, E, C>): Parser<B, E, C> =>from((o: C) => E.chain((a: A): Either<E, B> => afb(a).runParser(o))(fa.runParser(o)))} as const
Type declaration
chain: function
chain<A, B, E, C>(fa: Parser<A, E, C>, afb: function): Parser<B, E, C>
Run two parsers, failing if either fail and succeeding when both succeed.