Comment

Comment by okasaki

One thing I don't get is why do people prefer functions like accumulate? Why not:

    int sum = 0;
    for(auto&& wc : word_count) sum += wc.second
    return sum;
It's shorter, more general, more familiar, possibly has better performance[[citation needed]], and gives better errors if you mess something up.
parent okasaki 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton