Function memselect::new2[][src]

pub fn new2<A1, A2, I1, I2, F, R>(
    input1: I1,
    input2: I2,
    selector: F
) -> impl Selector2<A1, A2, Output = R> where
    F: FnMut(&I1::Output, &I2::Output) -> R,
    I1: Selector1<A1>,
    I1::Output: Clone + Eq,
    I2: Selector1<A2>,
    I2::Output: Clone + Eq,
    R: Clone

Creates a new memoizing selector with a two input functions.

If the return value of input1 and input2 doesn't change, selector will not be reinvoked and a cached copy of the result will be returned instead.