December 2021
Beginner
840 pages
47h 29m
English
This chapter introduced readers to functional programming through the Scheme programming language. We established that a recursive thought process toward function conception and implementation is an essential tenet of functional programming. We studied λ-expressions; the definition of recursive functions; and cons cells, lists, and S-expressions. We studied the use of the cons cell as a primitive for building data structures, which we defined using BNF. Data structures and the functions that manipulate them are natural reflections of each other—the BNF grammar for the data structure provides a pattern for the function definition. We also explored improved program readability and local binding through let, let*, and letrec ...