//NewR::ItemType = R; not yet supported in rust, NewR: Set<RS, I = R> might be, but I'd need to rewrite the trait for that and the related code. For now, we assume the code-generator creates correct code (if it wouldn't the code probably wouldn't run anyway...)
letmutresult_arr=[false;INNER_SIZE];// empty array representation of the inner settype
forouter_idxin0..OUTER_SIZE{
ifself.contains_idx(outer_idx){
letinner_set_arr=I::ItemType::from_idx(outer_idx).as_arr();// array representation of the current inner-set
forinner_idxin0..INNER_SIZE{result_arr[inner_idx]=comb_fn(result_arr[inner_idx],inner_set_arr[inner_idx]);}// logical combination between the arrays (or = union; and = intersection between sets)