For example, consider the function o. It takes a collection of numbers, s (with length l), iterates over all triples a, b, c of three elements from s (with repetition), counts the number of distinct sums a + b + c, and returns True if the number of distinct sums is equal to (l+2)-choose-3.

So for example, if you call o([2, 3, 4]) then the set of distinct sums will be