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

Functions as behavior

So what are functions? We can define them as parameterized, named chunks of code. This means that they are chunks of code that can be called from any other part of the program by their name. Parameterized means that you can call them with certain arguments. Different calls executed with different parameters usually lead to different results.

What is the motivation behind functions? The answer is the basic principle of engineering – abstract away that which repeats itself. In Chapter 1, The Declarative Programming Style, we saw something similar in the case of loops. However, loops are built-in control structures. This means they are defined at the language level. When we need to define some logic on the language-user ...

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