Function kimchi_msm::serialization::interpreter::fold_choice2
source · pub fn fold_choice2<Var, Foo>(list_len: usize, n: usize, f: Foo) -> Varwhere
Foo: Fn(usize, usize) -> Var,
Var: Clone + Add<Var, Output = Var> + From<u64>,
Expand description
A convenience helper: given a list_len
and n
(arguments of
choice2
), it creates an array consisting of f(i,j)
where i,j \in [0,list_len]
such that i + j = n
, and then sums all the
elements in this array.