Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -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;

View file

@ -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;