diff version a b = foldrDiff visit (empty, empty) a b where
  visit k a b (obsolete, new) =
    (maybe obsolete (flip (insert version k) obsolete) a,
     maybe new (flip (insert version k) new) b)
diff version a b = foldrDiff visit (empty, empty) a b where
  visit k a b (obsolete, new) =
    (maybe obsolete (flip (insert version k) obsolete) a,
     maybe new (flip (insert version k) new) b)
diff version a b = foldrDiff visit (empty, empty) a b where
  visit k a b (obsolete, new) =
    (maybe obsolete (flip (insert version k) obsolete) a,
     maybe new (flip (insert version k) new) b)