In trying to write an API I\'m struggling with Scala\'s collections in 2.8(.0-beta1).
Basically what I need is to write something that:
I'd have a look at the implementation of collection.immutable.BitSet. It's a bit spread out, reusing things from collection.BitSetLike and collection.generic.BitSetFactory. But it does exactly what you specified: implement an immutable set of a certain element type that adds new functionality.