std.array suggestion
Oskar Linde
oskar.lindeREM at OVEgmail.com
Thu Mar 9 05:59:04 PST 2006
Oskar Linde wrote:
> sum = fold(arr,0,int function(int a, int b) { return a+b; });
> prod = fold(arr,1,int function(int a, int b) { return a*b; });
> fold(arr,0,Archetype!(T) function(Archetype!(T) a, T b) {return a+b;});
Oops, those should of course read:
sum = fold(arr,0, function int(int a, int b) { return a+b; });
prod = fold(arr,1, function int(int a, int b) { return a*b; });
fold(arr,0, function Archetype!(T)(Archetype!(T) a, T b) {return a+b;});
/Oskar
More information about the Digitalmars-d
mailing list