This is the official source repository for the new book The Science of Functional Programming: A tutorial, with examples in Scala.
The book is a tutorial exposition of the theoretical knowledge that functional programmers need. The material is developed from first principles and contains complete explanations, derivations, and proofs of almost all required results.
Playlist: Lectures on relational parametricity
What I learned about functional programming while writing a book about it (extended version)
Explaining Curry-Howard correspondence
What did functional programming ever do for us
Reasoning about types and code illustrates some of the topics and methods of this book.
What did category theory ever do for us (functional programmers)
Playlist: Functional programming tutorials contains audio recordings with slides. The tutorials show an early version of the material in this book. Many notations and explanations have been revised and improved when writing up the text of the book.
The book is published under the GNU Free Documentation License. Permission is granted to copy, distribute and/or modify this book under the terms of that license. For those unfamiliar with the GNU FDL: this means the book is free (as in "freedom") -- free to use, to copy, to modify, and to distribute -- and will stay free forever, because any modified copy must have full modified sources distributed under the same license.
This git
repository
contains the full source code for the book (LyX / LaTeX / jpg / pdf) and shell scripts for building a PDF version of the book.
So, this is a "transparent" copy in the sense of the GNU license: the source code of the book is in a format that is convenient to use and to modify.
The "Releases" section of this repository contains (under "Assets") the full uncorrected draft (sofp.pdf
)
and the finished and proof-read part of the draft (sofp-draft.pdf
).
The latest release is
and represents the most recent, relatively stable version of the text.
The PDF version of the most recent master branch of the book can be downloaded by following the link to the PDF builds, clicking on the latest PDF build, and then clicking on "PDF files and LaTeX logs". Note that you need to be logged in to github in order to download files.
This repository also contains the slides for YouTube presentations that initiated the work on this book. The talk slides are not part of the book and are partially obsolete both in content and in the notation used.
The book is split into three volumes, corresponding to the three parts ranged by difficulty.
Volume 1 (Chapters 1-5) and Volume 2 (Chapters 6-12) are ready. Volume 3 is still in the works.
Chapter 13 in Volume 3 remains under construction. It is the last chapter to be written. After that, the book will be ready for general release.
The draft version is available for purchase on leanpub for people who want to be notified about updates.
A printed version of the current draft can be purchased at lulu.com.
This printed version contains only the chapters whose text has been edited and proofread. It corresponds to the PDF file
sofp-draft.pdf
(see the "Releases / Assets" section of github).
Readers are invited to create github issues in this repository and comment if they find something not clearly explained or wrong in the book, or if they wish to make comments or suggestions regarding the contents of the book.