Cashew on DSource

Chris Nicholson-Sauls ibisbasenji at gmail.com
Sun Sep 17 13:06:49 PDT 2006


Alright then, Cashew is now available via SVN from DSource.  Should save some posting 
here.  :)  Also I just added two new functions to the array utils: filter and find, based 
on looping expressions by the same name in the ColdC language.

Example of filter.

# int[] foo = ... ;
#
# // we only want foo's contents in the range 1 .. 24 for some reason
# int[] seg = foo.filter((int x){return x > 0 && x < 25;});

Example of find.

# int[] foo = ... ;
#
# // we want the first index of a value acceptable to some delegate
# bool delegate (int) dg = ... ;
# size_t index = foo.find(dg);

-- Christopher Nicholson-Sauls



More information about the Digitalmars-d-announce mailing list