Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type IResult<A, B, C> = Result<A, (B, C)>;
- pub fn one_of<I, T, Error>(list: T) -> impl Fn(I) -> IResult<I, char, Error> {
- Ok
- }
- pub fn escaped<P1, P2, T, O, Input, Error>(normal: P1, control: T, escapable: P2)
- -> impl FnOnce(Input) -> IResult<Input, Input, Error>
- where
- P1: Fn(Input) -> IResult<Input, O, Error>,
- P2: Fn(Input) -> IResult<Input, O, Error>,
- {
- Ok
- }
- fn main() {
- let alpha = Ok::<_, (_, ())>;
- escaped(alpha, '\\', one_of(""))("abcd");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement