void apply1_wores_vec (Vec& a, UFunc f) { if(a.is_empty()) return; typedef typename cnc_iterator<Vec>::type Iter; for(Iter i = a.begin(), iend = a.end(); i != iend; ++i) f(*i); }
void apply2_wores_val_by_vec (Val& a, Vec& b, BinOp f) { if(b.is_empty())return; typename cnc_iterator<Vec>::type bi = b.begin(), bend = b.end(); for(; bi != bend; ++bi) f(a, *bi); }
void apply2_wores_vec_by_val (Vec& a, Val& b, BinOp f) { if(a.is_empty())return; typename cnc_iterator<Vec>::type ai = a.begin(), aend = a.end(); for(; ai != aend; ++ai) f(*ai, b); }