Diff
Not logged in

Differences From Artifact [b76be1f6ad977d56]:

To Artifact [41ba420d0c49ce8d]:


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 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 -} 18 - 19 11 // To avoide the following ICE: 20 12 // src\phobos\std\algorithm.d(4552): 21 13 // Error: function std.algorithm.count!("a == b",string,char).count 22 14 // compiler error, parameter 'value', bugzilla 2962? 23 15 // Assertion failure: '0' on line 717 in file 'glue.c' 24 16 int count(T,V)(T[] a, V v) 25 17 {