Solving pr. 171: Intervals.