August 2018
Intermediate to advanced
380 pages
10h 2m
English
It's quite a different picture in functional languages. Let's have a look at the same abstraction, the List, in Scala's library. Its API documentation is available at https://www.scala-lang.org/api/current/scala/collection/immutable/List.html. It contains many more methods than can be found in Java's List. In contrast to the Java List interface, Scala's List abstraction is immutable. This means that once you have created a list, you are not able to modify it. All the modifications to the list can be implemented by just creating a modified copy of the list. This concept is referred to as structural sharing. This means that the objects that are members of the list are not copied, just that the structure of the list is ...