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.