Skip to Content
Mastering Functional Programming
book

Mastering Functional Programming

by Anatolii Kmetiuk
August 2018
Intermediate to advanced
380 pages
10h 2m
English
Packt Publishing
Content preview from Mastering Functional Programming

Functional collections

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781788620796Supplemental Content