pub fn delay<F>(&self, func: F) -> Collection<G, D, R>
    where F: FnMut(&G::Timestamp) -> G::Timestamp + Clone + 'static {

        let mut func1 = func.clone();
        let mut func2 = func.clone();

        self.inner
            .delay_batch(move |x| func1(x))
            .map_in_place(move |x| x.1 = func2(&x.1))
            .as_collection()
    }
Delays each difference by a supplied function.

It is assumed that `func` only advances timestamps; this is not verified, and things may go horribly
wrong if that assumption is incorrect. It is also critical that `func` be monotonic: if two times are
ordered, they should have the same order or compare equal once `func` is applied to them (this
is because we advance the timely capability with the same logic, and it must remain `less_equal`
to all of the data timestamps).
differential-dataflow/src/collection.rs