-
-- intersection
intersection tx ty = flipValidity diff -- turn valids off, invalids on
  where
    diff = difference tx' ty
    tx' = clean tx
    flipValidity = T23.mapEntries E.flipEntryValid
    -}
    
-- intersection O(n · log m)
intersection tx ty = insertAll xs empty
  where
    xs = [x | x <- toList tx, x `member` ty]
    
----------------------------------------------------------------


intersection tx ty = insertAll xs empty
  where
    xs = [x | x <- toList tx, x `member` ty]
    
----------------------------------------------------------------
intersection tx ty = insertAll xs empty
  where
    xs = [x | x <- toList tx, x `member` ty]
    
----------------------------------------------------------------