a lazy 1-dimensional slice of lazy 1-dimensionalal slices
import mir.algebraic_alias.csv: T = CsvAlgebraic; import mir.algebraic: Nullable; import mir.date: Date; import mir.test: should; auto o1 = ["a" : 1.T, "b" : 2.0.T] .StringMap!T; auto o2 = ["b" : true.T, "c" : false.T] .StringMap!T; auto o3 = ["c" : Date(2021, 12, 12).T, "d" : 3.T] .StringMap!T; alias NCA = Nullable!T; auto rows = [o1, o2, o3].objectsAsRows(["b", "c"]); rows.should == [ // a b [NCA(2.0.T), NCA(null)], [NCA(true.T), NCA(false.T)], [NCA(null), NCA(Date(2021, 12, 12))], ]; static assert(is(typeof(rows[0][0]) == NCA)); // evaluate import mir.ndslice.fuse: fuse; static assert(is(typeof(rows.fuse) == Slice!(NCA*, 2)));
Contruct a lazy random-access-range (ndslice)