fn threshold_total<R2: Abelian+'static, F: FnMut(&K,&R)->R2+'static>(&self, mut thresh: F) -> Collection<G, K, R2> {
        self.threshold_semigroup(move |key, new, old| {
            let mut new = thresh(key, new);
            if let Some(old) = old { 
                let mut add = thresh(key, old);
                add.negate();
                new.plus_equals(&add); 
            }
            if !new.is_zero() { Some(new) } else { None }
        })
    }
Reduces the collection to one occurrence of each distinct element.

# Examples

```
use differential_dataflow::input::Input;
use differential_dataflow::operators::ThresholdTotal;

::timely::example(|scope| {
// report the number of occurrences of each key
scope.new_collection_from(1 .. 10).1
.map(|x| x / 3)
.threshold_total(|_,c| c % 2);
});
```
differential-dataflow/src/operators/threshold.rs