Function problem

  • Indicate that a parser has reached a dead end. "Everything was going fine until I ran into this problem." Check out the andThen docs to see an example usage.

    const parser = problem("I always fail!")
    run(parser)("doesn't matter") // => Err {... "I always fail!" ...}

    See

    Type Parameters

    • A

    Parameters

    • msg: string

    Returns Simple.Parser<A>