Table of Contents
Preface
Part 1: Basic Functional Programming
1
Functions
Technical requirements
What is FP?
Programming with functions
Brief history of FP
Haskell
Other contemporary FP languages
Prominent application areas
Writing basic functions
Our first function
A two-parameter function
Custom operators
Programming with primitive types
Int and Integer
Float and Double
Booleans
Char and String
Converting between primitive types
Putting the type checker to work
Checking function calls
Checking function definitions
Disambiguating overloaded functions
Inferring types
Combining functions
Calling functions from within functions
Naming intermediate results
Local function definitions
Summary
Questions
Further reading
Answers
2
Algebraic Datatypes ...
Get Soar with Haskell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.