Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


Ramble (version 0.1.1)

using: using combinator allows us to manipulate results from a parser, for example building a parse tree. The parser (p %using% f) has the same behaviour as the parser p, except that the function f is applied to each of its result values.

Description

%using% is the infix operator for using, and it is the preferred way to use the using operator.

Usage

using(p, f)

Arguments

p
is the parser to be applied
f
is the function to be applied to each result of p.

Value

The parser (p %using% f) has the same behaviour as the parser p, except that the function f is applied to each of its result values.

Examples

Run this code
(item() %using% as.numeric) ("1abc")

Run the code above in your browser using DataLab