Section 17.2 Functional Programming Technologies Overview

• Prior to functional programming, you typically determined what you wanted to accomplish, then specified the precise steps to accomplish that task.

• Using a loop to iterate over a collection of elements is known as external iteration (p. 731) and requires accessing the elements sequentially. Such iteration also requires mutable variables.

• In functional programming (p. 732), you specify what you want to accomplish in a task, but not how to accomplish it.

• Letting the library determine how to iterate over a collection of elements is known as internal iteration (p. 732). Internal iteration is easier to parallelize.

• Functional programming focuses on immutability (p. 732)—not modifying ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.