import { mapErr } from "https://deno.land/x/pazza@v0.3.0/mod.ts";
Execute the embedded parser. If it fails, apply provided function on the error.
const parser = map(digit(), error => "Not a digit.");
parser("a").error === "Not a digit.";
import { mapErr } from "https://deno.land/x/pazza@v0.3.0/mod.ts";
Execute the embedded parser. If it fails, apply provided function on the error.
const parser = map(digit(), error => "Not a digit.");
parser("a").error === "Not a digit.";