January 2023
Intermediate to advanced
648 pages
17h 32m
English

The function is the central idea of functional programming. In this chapter, we’ll learn how to define functions and constants and how to use those functions and constants in GHCi. We’ll discuss the language we use to talk about functions, and we’ll see how communicating with computers often requires more precision than communicating with people. We’ll then introduce Haskell’s system of anonymous functions, which are functions without a name. After a brief glimpse of Haskell’s type system (which we’ll describe more in Chapter 3), we’ll show how the function composition operator can be used to compose functions. Finally, ...
Read now
Unlock full access