> Why do you limit the intervals to datetime? Are there any assumptions in > your code that would make it fail with int values? It has been generalized. Now it can be used with any immutable ordered type. :-)