many: 'many' matches 0 or more of pattern 'p'. In BNF notation,...

Description Usage Arguments See Also Examples

Description

This implementation of many differs from (Hutton92) due to the nature of R's data structures. Since R does not support the concept of a list of tuples, we must revert to using a list rather than a vector, since all values in an R vector must be the same datatype.

Usage

1
many(p)

Arguments

p

is the parser to match 0 or more times.

See Also

maybe, some

Examples

1
2
3
Digit <- function(...) {satisfy(function(x) {return(!!length(grep("[0-9]", x)))})}
many(Digit()) ("123abc")
many(Digit()) ("abc")

Ramble documentation built on May 1, 2019, 7:17 p.m.