pub fn mux<I, P1, P2>(op1: P1, op2: P2) -> Mux<P1, P2>where
I: Clone,
P1: GatOperator<I>,
P2: GatOperator<I>,
Expand description
Use two operators simultaneously.
use indicator::gat::*;
fn plus_mul() -> impl for<'out> GatOperator<usize, Output<'out> = usize> {
mux(map(|x| x + 1), map(|x| x * 2)).map(|(x, y)| x + y)
}