In Scala, for many (all?) types of collections you can create views.
What exactly is a view and for which purposes are views useful?
view is used for lazy computation,but not for saving memory.
When you create a view against a collection, the memory has already been allocated forthe collection.
When creating the view with val view = Range(1,9).view., the collection has already been allocated the memory, if it is too large,say,Range(1,1000000000), OOM can't be avoid