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

Chapter 6

  1. Asynchronous computations.
  2. Try represents the erroneous case as an exception. Exceptions may not always be desirable in a functional context since they make sense only when we want to throw them. Functional programming discourages throwing exceptions since they are side effects. Hence, we have a more general type called Either that is capable of representing an alternative between any two values.
  3. One way of representing dependency injection in functional programming is via the Reader type. It is an abstraction of the fact that a computation depends on some value and cannot be executed without it. Reader is basically a function. However, it has a more concise signature, and the concept of continuation with flatmap is applied to ...
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