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

Effect Types - Abstracting Away Side Effects

In the previous chapter, we saw why side effects may be a source of trouble. We also briefly discussed effect types. Effect types are a technique of functional programming that allow for the abstraction of side effects.

In this chapter, we will have a look at how this works. We will learn the philosophy behind the pattern. Also, we will see how to sequentially combine side effects trapped in effect types.

In this chapter, we will cover the following topics:

  • Turning effects into data
  • The sequential combination of effect types with Monads – the map and flatMap functions
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