list of values that share a common type
Compacted array of values cast to common type T
1 import ddash.utils: isFalsey; 2 auto a = compact!isFalsey(1, 0, 2, 0, 3); 3 auto b = compact!isFalsey(1, 0, 2.0, 0, 3); 4 5 assert(a.equal([1, 2, 3])); 6 assert(b.equal([1, 2, 3])); 7 8 static assert(is(typeof(a.array) == int[])); 9 static assert(is(typeof(b.array) == double[]));
0.0.1
Compacts a list of values