enum t0 = tuple(1, 2, 3); static assert(map!(x => x)(t0) == t0); enum t = tuple(1, 2, tuple(3, tuple(tuple(4, 5), 6), 7)); static assert(map!(x => x)(t) == t); assert(map!(x => 2 * x)(t0) == tuple(2, 4, 6)); static assert(map!(x => 2 * x)(t) == tuple(2, 4, tuple(6, tuple(tuple(8, 10), 12), 14))); static assert(map!((int x, int y) => x + y)(tuple(1, 2)) == 3); static assert(map!((int x, int y) => x + y)( tuple(tuple(1, 2), tuple(tuple(3, 4), tuple(5, 6)))) == tuple(3, tuple(7, 11)));
simple map over tuples