Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import std.stdio, std.algorithm, std.array;
|
||||
|
||||
dchar[][] consolidate(dchar[][] sets) {
|
||||
dchar[][] consolidate(dchar[][] sets) @safe {
|
||||
foreach (set; sets)
|
||||
set.sort;
|
||||
set.sort();
|
||||
|
||||
foreach (i, ref si; sets[0 .. $ - 1]) {
|
||||
if (si.empty)
|
||||
|
|
@ -17,7 +17,7 @@ dchar[][] consolidate(dchar[][] sets) {
|
|||
return sets.filter!"!a.empty".array;
|
||||
}
|
||||
|
||||
void main() {
|
||||
void main() @safe {
|
||||
[['A', 'B'], ['C','D']].consolidate.writeln;
|
||||
|
||||
[['A','B'], ['B','D']].consolidate.writeln;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import std.stdio, std.algorithm, std.array;
|
||||
|
||||
dchar[][] consolidate(dchar[][] sets) {
|
||||
dchar[][] consolidate(dchar[][] sets) @safe {
|
||||
foreach (set; sets)
|
||||
set.sort;
|
||||
set.sort();
|
||||
|
||||
dchar[][] consolidateR(dchar[][] s) {
|
||||
if (s.length < 2)
|
||||
|
|
@ -20,7 +20,7 @@ dchar[][] consolidate(dchar[][] sets) {
|
|||
return consolidateR(sets);
|
||||
}
|
||||
|
||||
void main() {
|
||||
void main() @safe {
|
||||
[['A', 'B'], ['C','D']].consolidate.writeln;
|
||||
|
||||
[['A','B'], ['B','D']].consolidate.writeln;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue