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(grepl("[0-9]", x))})}
many(Digit()) ("123abc")
many(Digit()) ("abc")

chappers/Ramble documentation built on May 13, 2019, 3:30 p.m.