import { sepEndBy } from "https://deno.land/x/pazza@v0.3.0/mod.ts";
Execute the embedded parser in specified times, with another parser as separator, then produce a list of values. Separator can be trailing.
sepEndBy(char(","), digit())("1,2").output; // ==> ["1", "2"]
sepEndBy(char(","), digit())("1,2,").output; // ==> ["1", "2"]
sepEndBy(char(","), digit())("1,2,").input === "";
sepEndBy(char(","), digit(), 1)("").ok === false;
sepEndBy(char(","), digit(), 0, 1)("1,2").output; // ==> ["1"]
sepEndBy(char(","), digit(), 0, 1)("1,2").input === "2";