struct A { int a; } struct B { int b; } struct test01 { static auto opCall(R)(R t) if (isForwardRange!R) { return ParseResult!(R, A)(t, A(1)); } } alias test02 = transform!(test01, x => B(x.a+1)); auto res = test02("asdf"); static assert(isParser!test01); static assert(isParser!test02); static assert(is(typeof(res).DataType == B));
Apply func to the error returned by the Parser
Similar to transform, but operates on error instead of data