let rec intersects t ~low ~high =
  match t with
  | Empty -> false
  | Node n -> 
      if interval_overlap low high n.lo n.hi then true
      else if interval_overlap low high n.left_end n.right_end then
        intersects n.left ~low ~high || intersects n.right ~low ~high 
      else false