Set consolidation: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: changed/added comments and whitespace, changed a DO FOREVER loop into a DO UNTIL.) |
(Updated both D entries) |
||
Line 531:
<lang d>import std.stdio, std.algorithm, std.array;
dchar[][] consolidate(dchar[][] sets) @safe {
foreach (set; sets)
set.sort();
foreach (i, ref si; sets[0 .. $ - 1]) {
Line 548:
}
void main() @safe {
[['A', 'B'], ['C','D']].consolidate.writeln;
Line 567:
<lang d>import std.stdio, std.algorithm, std.array;
dchar[][] consolidate(dchar[][] sets) @safe {
foreach (set; sets)
set.sort();
dchar[][] consolidateR(dchar[][] s) {
Line 587:
}
void main() @safe {
[['A', 'B'], ['C','D']].consolidate.writeln;
|