@@ -6,8 +6,16 @@ public import std.string; public import std.typecons; public import std.math; import std.c.stdlib; + +T[] erase(T,V)(T[] xs, V y) +{ + foreach(i,x; xs) + if(x == y) + return xs[0..i]~xs[i+1..$]; + return xs; +} // To avoide the following ICE: // src\phobos\std\algorithm.d(4552): // Error: function std.algorithm.count!("a == b",string,char).count