let first_of_diff d = match d with Add (i2,i,_) -> first_of_index i | Delete (i2,i,_) | Change (i2,_,i,_) -> (first_of_index i) - (range_of_index i2)