Comment Comment by 1234567890123 Just for comparison, in Haskell: total = sum $ take 10 (map (\x->x*x) [1..]) For this C++ code: int total = MakeStream::counter(1) | map_([] (int x) { return x * x; }) | limit(10) | sum(); C++ code doesn't look that bad! parent 1234567890123 11 years ago