import { either , fail , Parser } from "parser-ts/lib/Parser" ; export const anyOf = < S , T > ( parsers ) => { return parsers . reduceRight ( ( acc , cur ) => either ( cur , ( ) => acc ) , fail ( ) ) ; } ;