Skip to Main Content
Mastering Functional Programming
book

Mastering Functional Programming

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

Traverse

Previously, we learned about the Applicative type class. We argued that the main utility of the Applicative type class is that it allows us to combine two independent computations in parallel. No longer are we bound by the flatMap function that performs sequential composition, so that if one computation fails then no other computation is ever performed. In the Applicative scenario, all of the computations are performed, despite the fact that some of them can fail.

However, Applicative is only able to combine two independent computations. There are also methods to combine up to 22 computations into tuples. However, what if we need to combine an arbitrary amount of computations? The usual generalization for multiplicity is 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
Functional Programming in Scala

Functional Programming in Scala

Runar Bjarnason, Paul Chiusano

Publisher Resources

ISBN: 9781788620796Supplemental Content