Do you mind renaming this function to andNot? It is not obvious to non scala programmers that ~ is negation. If you want to maintain the Scala operator style, you can create a &~ function that delegates to andNot.