Differences From Artifact [b76be1f6ad977d56]:
- File        
src/util.d
- 2012-07-15 11:17:59 - part of checkin [ff0ab77d3d] on branch trunk - new game class. (user: kinaba) [annotate]
 
To Artifact [41ba420d0c49ce8d]:
- File        
src/util.d
- 2012-07-15 07:02:32 - part of checkin [8acc8e6c78] on branch trunk - Prioritize distant lambda. (user: kinaba) [annotate]
- 2012-07-15 12:14:10 - part of checkin [e02668367d] on branch trunk - Revert redesign in the trunk. (user: kinaba) [annotate]
 
     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   {