Use this function to implement the GenomicArray.cut method (#226). The FJOIN algorithm should do the trick in O(n) time.