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

Imperative collections

Let's have a look at how collections are understood within the framework of an imperative programming language, while also looking at Java's abstraction of a list. Its API documentation is available at https://docs.oracle.com/javase/8/docs/api/java/util/List.html. This interface only has a limited number of methods defined. The first thing that we need to pay attention to here is mutability. Immediately, we see methods such as add and remove. This implies that this interface is supposed to be implemented by a mutable collection that is supposed to implement the operations that add or remove data from it. You should be aware that methods can throw an UnsupportedOperationException, which means that certain collections ...

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