Jump to content

Set consolidation: Difference between revisions

Updated both D entries
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;
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.