How do I implement a collection in Scala 2.8?

后端 未结 1 464
面向向阳花
面向向阳花 2021-02-07 19:31

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:

  • adds functionality
相关标签:
1条回答
  • 2021-02-07 19:45

    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.

    0 讨论(0)
提交回复
热议问题