%alt% is the infix notation for the alt function.

Share:

Description

%alt% is the infix notation for the alt function.

Usage

1
p1 %alt% p2

Arguments

p1

the first parser

p2

the second parser

Value

Returns the first parser if it suceeds otherwise the second parser

Examples

1
(item() %alt% succeed("2")) ("abcdef")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.