4.66 Exercise 4.66
Ben has realized that his accumulation function will give incorrect results when the same results are found multiple times by the query. This is not a flaw in the accumulation method per se, but is an awkward fact that needs to be considered when using accumulations in a system like this.
It may be possible in some situations to modify the query to dedupe the results. Or perhaps adding a deduplication mechanism to the language itself – similar to the UNIQUE keyword in SQL – is a reasonable solution.