September 17, 2006 Cashew on DSource | ||||
---|---|---|---|---|
| ||||
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 |
Copyright © 1999-2021 by the D Language Foundation