How about this? foreach( ...; obj[m .. n] ) means int obj.opSliceApply(m, n, int delegate(...) dg) It is removed the necessity of making tmpObj(like struct) for opApply; -- knjhara