# The Science of Functional Programming: Source Book and Build Guide

> The Science of Functional Programming is a source-distributed Scala tutorial covering functional programming theory through derivations, proofs, and examples. Its first two volumes are ready, while Volume 3 remains under construction.

**winitzki/sofp** — A free book: "The Science of Functional Programming"

- Repository: https://github.com/winitzki/sofp
- Stars: 1,483 · Forks: 100
- Language: TeX
- License: GPL-2.0
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/winitzki-sofp

## What The Science of Functional Programming Covers

This repository addresses a specific educational problem: it explains the theoretical knowledge expected of functional programmers while using Scala for its examples. It is aimed at readers who want derivations and proofs rather than a collection of isolated syntax demonstrations. The README describes the book as a tutorial exposition developed from first principles, with complete explanations, derivations, and proofs of almost all required results.

The project is a book rather than an executable library. There is no application API, service, or package that a Scala project depends on. Its deliverables are educational text, publication sources, slides, and generated PDF files. This distinction matters when evaluating adoption. A developer looking for a library to add to a build will not find that use case. A reader looking for a structured treatment of functional programming theory can use the repository as both a reference and a modifiable publication project.

The book is divided into three volumes arranged by difficulty. Volume 1 contains Chapters 1 through 5, and Volume 2 contains Chapters 6 through 12. Both are described as ready. Volume 3 is incomplete, with Chapter 13 still under construction and identified as the last chapter to be written. The repository also contains presentation slides, but the README warns that some are partly obsolete in content and notation. They should not be treated as synchronized editions of the current book.

## How The LaTeX Sources Produce Book PDFs

The repository is a transparent source publication. According to the README, it contains LyX files, LaTeX files, JPG files, PDF files, and shell scripts for building a PDF version of the book. The text is therefore not distributed only as a finished document. Contributors can inspect the source, revise the material, and use the included build path to produce a new PDF.

Release assets and the GitHub Actions workflow serve different purposes. GitHub Releases includes `sofp.pdf`, described as the full uncorrected draft, and `sofp-draft.pdf`, described as the finished and proof-read part of the draft. The master branch has a separate build route. The README directs readers to GitHub Actions, then to the latest PDF build and the entry labeled “PDF files and LaTeX logs.” It also states that a person must be logged in to GitHub to download those files.

This arrangement separates source authority from generated output. Releases provide named artifacts, while Actions produces output from the current master branch. The top-level repository includes `sofp-src/`, shell scripts, images, and existing PDFs. The README does not document every file-level dependency or a complete local compilation command. It also does not identify the required TeX distribution or package versions. A local contributor cannot derive a reproducible toolchain from the README alone and would need to inspect the repository files.

## Choosing Between sofp.pdf and sofp-draft.pdf

The PDF choice depends on whether the reader prioritizes breadth or editorial completion. The README calls `sofp.pdf` the full uncorrected draft. It says `sofp-draft.pdf` contains the finished and proof-read part of the draft. A reader who needs the whole draft can select the former, while a reader who prefers edited and proof-read material should inspect the latter.

The publication state is mixed. Volume 1 and Volume 2 are ready, but Volume 3 is still being written. The roadmap records completed milestones through Chapters 1 through 12 and Chapter 14, while the current status still says that Chapter 13 remains under construction. This produces a notable numbering detail: the completion of Chapter 14 does not mean that Volume 3 is complete.

Several access routes are listed. GitHub Releases hosts draft PDFs. Leanpub offers a full draft for purchase to people who want update notifications. The README also links to Amazon listings for Volumes 1 and 2 and to a Lulu printed draft corresponding to `sofp-draft.pdf`. These are separate editions with different stated editorial states, so filenames and release descriptions should be checked before selecting one.

For study, use the artifact whose chapter range matches the intended material. Volume 1 covers Chapters 1 through 5, while Volume 2 covers Chapters 6 through 12. A reader following the planned three-volume sequence must account for the unfinished state of Volume 3.

## Obtaining and Building the Scala Book

The README gives no package-installation command and no confirmed local build sequence. It says the project can be obtained through the repository, while the GitHub Releases section contains downloadable PDFs. It also points to GitHub Actions for a PDF generated from master. Without a documented command, dependency list, or toolchain declaration, this article does not invent one.

For a first reading pass, open the latest release and inspect the descriptions of `sofp.pdf` and `sofp-draft.pdf`. The full uncorrected draft offers the wider book, whereas the proof-read draft contains the chapters that have completed that editorial stage. Then read the volume or chapter range named in the current project status rather than assuming that every chapter has the same maturity.

If the goal is modification, obtain the repository and inspect `sofp-src/` together with the shell scripts referenced by the README. The repository files provide a source format suitable for generating a PDF, but the README does not state the required TeX distribution, package versions, or exact invocation. Those details would need to come from the build files rather than an assumed generic LaTeX command.

The documented online build route is GitHub Actions. Open the Actions page, select the latest PDF build, and download “PDF files and LaTeX logs.” The README states that GitHub login is required for this download. This route is concrete because it identifies the workflow output and its access condition, even though the local toolchain remains undocumented in the README.

## License Obligations for Modified Book Versions

The README identifies the book as published under the GNU Free Documentation License. It states that permission is granted to copy, distribute, and modify the book under that license. It also explains the practical condition stated there: a modified copy must include its full modified sources under the same license. That source requirement makes the repository suitable for collaborative editing and derivative book versions, subject to the license itself.

Repository metadata lists `GPL-2.0`, while the README links specifically to the GNU Free Documentation License. Those identifiers are not interchangeable by name, and the README does not explain whether the metadata applies separately to repository files or represents a labeling inconsistency. Someone preparing a redistribution should inspect `LICENSE` and the README's licensing statement rather than assuming that the metadata identifier settles the treatment of every file.

The source obligation also applies when generating a revised PDF. A changed PDF should not be treated as detached from the sources described in the README. The repository provides a transparent publication format, but a distributor must preserve the corresponding source materials and follow the applicable GNU terms.

Maintenance is supported by recent repository activity. The last push was on 2026-10-09, and the repository is not archived. That does not make the unfinished material complete. The latest listed release is v2.2 from 2024-09-18, while master has received later pushes. Readers should compare a release with master when they need the newest available text.

## Using sofp Slides Alongside Current Chapters

The repository includes `old_slides/` and `talk_slides/`. The README says YouTube presentations initiated the book's development and that the tutorials show an early version of the material. It also states that notations and explanations were revised and improved during the writing of the book.

This creates a clear source hierarchy. The current repository is the official source for the book. The slide decks document talks and earlier explanations, not the current finished text. The README explicitly warns that the talk slides are partly obsolete in both content and notation. They may still be useful for tracing a presentation of a topic, but they are poor substitutes when a reader needs the current definition, derivation, or proof.

Online learners face a concrete risk here. A recording may present an argument that was later rewritten, while its slides retain older notation. The book, release PDF, and current source should therefore take precedence during study. The slides belong to the repository's publication history rather than the current reading sequence.

The repository contains several kinds of artifacts: current book source, generated documents, presentations, and historical material. They do not form one synchronized edition. Editorial status must be checked for each artifact, especially when a formal definition or completed proof matters.

## When The Science of Functional Programming Is the Wrong Choice

The main reason to choose this project is its combination of Scala examples, theoretical derivations, and proofs. The main reason not to choose it as a quick reference is its book format and uneven completion state. A programmer seeking a short answer to a language or library question may find a tutorial slower than targeted language documentation.

The unfinished Chapter 13 is a firm boundary. Someone who needs all three volumes as a continuous completed course cannot treat the current master branch as a finished edition. The difference between `sofp.pdf` and `sofp-draft.pdf` also requires attention because one is described as the full uncorrected draft and the other contains the edited and proof-read portion.

A PDF-only book and this source repository create different obligations for readers. Someone who only needs the text can use a release artifact. A contributor who wants to revise explanations, proofs, or notation must work with LyX, LaTeX, images, and shell scripts. Since the README does not provide a complete local dependency recipe, contributors who cannot access GitHub Actions face an additional setup barrier.

A PDF-only tutorial can be easier to acquire because it offers edited reading material without inspectable LaTeX sources or a contribution build. This repository requires more attention to source and licensing in exchange for transparency and modification rights. That exchange makes sense for collaborative textbook work, but it is unnecessary for a reader who only wants a stable download.

## Conclusion

Adopt this repository if you want to read, modify, or build a theory-oriented Scala book under a free documentation license. Do not treat the current master branch as a finished three-volume release, because Chapter 13 remains unfinished and the release assets contain a draft. Verify the PDF build workflow, the chapter you need, and the terms in LICENSE before incorporating the text into a course or derivative publication.

## FAQ

### Is The Science of Functional Programming free to read and modify?

Yes. The README says the book is published under the GNU Free Documentation License, with permission granted to copy, distribute, and modify it under that license.

### Is The Science of Functional Programming finished?

No. Volume 1 and Volume 2 are described as ready, but Volume 3 is still in progress and Chapter 13 remains under construction.

### Where can I get the PDF of The Science of Functional Programming?

The README says GitHub Releases contains `sofp.pdf` and `sofp-draft.pdf`. A PDF from master is available through GitHub Actions, where a GitHub login is required to download the files.

## Sources

- [Issues](https://github.com/winitzki/sofp/issues)
- [License: GPL-2.0](https://github.com/winitzki/sofp/blob/master/LICENSE)
- [README](https://github.com/winitzki/sofp/blob/master/README.md)
- [Releases](https://github.com/winitzki/sofp/releases)
- [winitzki/sofp on GitHub](https://github.com/winitzki/sofp)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/winitzki-sofp
