Segment tree upd (functor instead interface)