Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering Functional Programming

You're reading from   Mastering Functional Programming Functional techniques for sequential and parallel programming with Scala

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781788620796
Length 380 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Anatolii Kmetiuk Anatolii Kmetiuk
Author Profile Icon Anatolii Kmetiuk
Anatolii Kmetiuk
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. The Declarative Programming Style FREE CHAPTER 2. Functions and Lambdas 3. Functional Data Structures 4. The Problem of Side Effects 5. Effect Types - Abstracting Away Side Effects 6. Effect Types in Practice 7. The Idea of the Type Classes 8. Basic Type Classes and Their Usage 9. Libraries for Pure Functional Programming 10. Patterns of Advanced Functional Programming 11. Introduction to the Actor Model 12. The Actor Model in Practice 13. Use Case - A Parallel Web Crawler 14. Introduction to Scala 15. Assessments 16. Other Books You May Enjoy

Functions in functional programming

In imperative programming, functions are used to represent the behavior of an object. In object-oriented programming, the behavior usually implies side effects. For the purposes of this book, we can understand side effects as follows—a function is side-effecting when it modifies the environment outside its own body. For example, it can have a global variable of its parent object modified, it can write a file into the filesystem, or the function can perform some web API calls over the network.

In functional programming, the understanding of functions is quite different. In functional programming, we prise purity and referential transparency. Purity means the absence of side effects. Referential transparency means that the result value the function has computed can be substituted in place of the function call, while the semantics of the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime