add a function for summing an array of values
Created attachment 126161 [details] Patch
I wasn't sure if it was OK to use std::accumulate from <numeric>. If it is OK, then I'm happy to throw away this patch. Or perhaps I should just write the for loop in my code (I wanted to sum a WTF::Vector<LayoutUnit>).
Next thing I know you're gonna have us using map/reduce in our code! ;p
And this is a good opportunity to utilize TestWebKitAPI ;-)
Comment on attachment 126161 [details] Patch I don't need this patch anymore, but maybe someone else who wants it can resurrect it with a test.
It should be fine to use std::accumulate - the parts of STL we stay shy of is those that can raise exceptions.
Sounds good, I'll use std::accumulate in the future.