Union of intervals/Continuous function to R/Exercise