Diff
Not logged in

Differences From Artifact [41ba420d0c49ce8d]:

To Artifact [b76be1f6ad977d56]:


3 3 public import std.conv; 4 4 public import std.range; 5 5 public import std.stdio; 6 6 public import std.string; 7 7 public import std.typecons; 8 8 public import std.math; 9 9 import std.c.stdlib; 10 + 11 +T[] erase(T,V)(T[] xs, V y) 12 +{ 13 + foreach(i,x; xs) 14 + if(x == y) 15 + return xs[0..i]~xs[i+1..$]; 16 + return xs; 17 +} 10 18 11 19 // To avoide the following ICE: 12 20 // src\phobos\std\algorithm.d(4552): 13 21 // Error: function std.algorithm.count!("a == b",string,char).count 14 22 // compiler error, parameter 'value', bugzilla 2962? 15 23 // Assertion failure: '0' on line 717 in file 'glue.c' 16 24 int count(T,V)(T[] a, V v)