pub fn tuple_t<I, I1, I2, P1, P2>(p1: P1, p2: P2) -> Tuple<I, P1, P2> where
    I: Tickable<Value = (I1, I2)>,
    P1: Operator<TickValue<I1>>,
    P2: Operator<TickValue<I2>>,
    P1::Output: Tickable,
    P2::Output: Tickable
Expand description

Apply ticked operators on tuple input to get output tuple.

use indicator::*;

fn plus_one_two<M, I, Q>(mode: M) -> impl Operator<I, Output = TickValue<(usize, usize)>>
where
    M: TumblingWindow,
    I: Tickable<Value = usize>,
    Q: QueueCapAtLeast<0, Item = usize>,
{
    cached(mode, |_q: &Q, _n, x: &usize| (*x, *x))
        .then(tuple_t(map_t(|x| x + 1), map_t(|x| x + 2)))
}