and = (p1, p2) => ({input, cursor}) => {
const {ast, input: input1, cursor: cursor1, error, reason} = p1({input, cursor});
if(!error) {
const {ast: ast2, cursor: cursor2, error, reason} = p2({input, cursor: cursor1});
if(!error) return {ast: [].concat(ast).concat(ast2), input, cursor: cursor2};
else return {error, reason, input, cursor};
} else return {error, reason, input, cursor};
}