Re: Phobos2029 algorithm example can't compile

2009-05-13 Thread Sam Hu
It can compile if import std.typecons and modify as below: import std.typecons; import std.algorithm; void main() { double[] a=[3.0,4,7,11,3,2,5]; auto ret=reduce!("a+b","a+b*b")(tuple(0.0,0.0),a); } Here a explicit tuple is needed.

Phobos2029 algorithm example can't compile

2009-05-04 Thread Sam
double[] a=[3.0,4,7,11,3,2,5]; auto ret=reduce!("a+a","a+b*b")(0.0,0.0,a); phobos2Ex.d(13): Error: template std.algorithm.Reduce!("a+a","a+b*b").reduce(E,Range) does not match any function template declaration phobos2Ex.d(13): Error: template std.algorithm.Reduce!("a+a","a+b*b").reduce(E,Range)