macro_rules! gen_if_else {
    (($i:expr, $idx:expr), $cond:expr, $submac_if:ident!( $($args_if:tt)* ), $submac_else:ident!( $($args_else:tt)* )) => { ... };
    (($i:expr, $idx:expr), $cond:expr, $f:expr, $g:expr) => { ... };
}
Expand description

gen_if_else!(bool, I -> Result<I,E>, I -> Result<I,E>) => I -> Result<I,E> Conditional combinator, with alternate generator.

Wraps another generator and calls it if the condition is met. This combinator returns the return value of the child generator.

If the condition is not satisfied, calls the alternate generator.