== Quote from Jimmy Cao (jcao...@gmail.com)'s article > The Python version: > sum(item * item for item in sequence) > can be translated to English as: > "Sum of (item * item) foreach item in sequence" > While the D version: > reduce!("a+b")(map!("a*a")(sequence), 0); > looks to me like: > Reduce! a plus b map! a times a (sequence) (and a random 0 here).
If you write it as: auto sum(Range)(Range r) { return reduce!("a+b")(r, 0); } alias unaryFun("a*a") square; alias map!(square) squares; return sum(squares(sequence)); then it looks better than Python :-) Or can we only judge a language by what's in its standard library?