Diff
Not logged in

Differences From Artifact [41ba420d0c49ce8d]:

To Artifact [b76be1f6ad977d56]:


3 public import std.conv; 3 public import std.conv; 4 public import std.range; 4 public import std.range; 5 public import std.stdio; 5 public import std.stdio; 6 public import std.string; 6 public import std.string; 7 public import std.typecons; 7 public import std.typecons; 8 public import std.math; 8 public import std.math; 9 import std.c.stdlib; 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 // To avoide the following ICE: 19 // To avoide the following ICE: 12 // src\phobos\std\algorithm.d(4552): 20 // src\phobos\std\algorithm.d(4552): 13 // Error: function std.algorithm.count!("a == b",string,char).count 21 // Error: function std.algorithm.count!("a == b",string,char).count 14 // compiler error, parameter 'value', bugzilla 2962? 22 // compiler error, parameter 'value', bugzilla 2962? 15 // Assertion failure: '0' on line 717 in file 'glue.c' 23 // Assertion failure: '0' on line 717 in file 'glue.c' 16 int count(T,V)(T[] a, V v) 24 int count(T,V)(T[] a, V v)