Extending Scala collections

后端 未结 4 2175
执念已碎
执念已碎 2021-01-20 02:13

I would like to derive a version of a Scala built-in collection that expands on the functionality for a particular generic type e.g.,

import scala.collection         


        
4条回答
  •  死守一世寂寞
    2021-01-20 02:32

    The general answer to your question is a bit too involved for a response here. But it has been written up in some web pages.

    The same material with more context is also in the 2nd edition of our book, Programming in Scala, Artima Press.

提交回复
热议问题