import mir.ndslice.slice: sliced; ProdAccumulator!float x; x.put([1, 2, 3].sliced); assert(x.prod == 6f); x.put(4); assert(x.prod == 24f);
See Implementation