November 2017
Intermediate to advanced
386 pages
9h 22m
English
So far, we have seen how to use functions to work with or transform, other functions, to process data structures, or to create data types. Let's then finish this chapter by showing how a function can actually implement a data type by itself, becoming a sort of container of its own. In fact, this is a basic theoretical point of the lambda calculus (and if you want to learn more, look up Church Encoding and Scott Encoding), so we might very well say that we have come around to the point where we began this book, at the origins of Functional Programming!