What is the difference between a view and a stream?

前端 未结 2 377
[愿得一人]
[愿得一人] 2021-02-02 10:16

In the Scala 2.8 collections framework, what is the difference between view and toStream?

2条回答
  •  野性不改
    2021-02-02 10:59

    Geoff's answer covers almost everything, but I want to add that a Stream is a List-like sequence, while every kind of collections (maps, sets, indexed seqs) have views.

提交回复
热议问题