This is an unofficial PDF version of "Category Theory for Programmers" by Bartosz Milewski, converted from his blogpost series (with permission!)
The best way to build the book is using the Nix package manager. After installing Nix, if you're using a non-NixOS operating system, you need to install
nixFlakes in your environment following the steps below (source):
$ nix-env -iA nixpkgs.nixFlakes
/etc/nix/nix.conf and add:
experimental-features = nix-command flakes
This is needed to expose the Nix 2.0 CLI and flakes support that are hidden behind feature-flags.
Also, if the Nix installation is in multi-user mode, don’t forget to restart the nix-daemon.
nix flake show in the root directory of the project to see all the available versions of this book. Then type
nix build .#<edition> to build the edition you want (Haskell, Scala, OCaml, Reason and their printed versions). For example, to build the Scala edition you'll have to type
nix build .#ctfp-scala.
Upon successful compilation, the PDF file will be placed in the
result directory inside the root directory
milewski-ctfp-pdf of the repository.
preamble.tex contains all the configuration and style declarations.
PDF LaTeX source and the tools to create it are based on the work by Andres Raba et al., available here: https://github.com/sarabander/sicp-pdf.
The book content is taken, with permission, from Bartosz Milewski's blogpost series, and adapted to the LaTeX format.
Thanks to the following people for contributing corrections/conversions and misc:
The original blog post acknowledgments by Bartosz are consolidated in the Acknowledgments page at the end of the book.
Note from Bartosz: I really appreciate all your contributions. You made this book much better than I could have imagined. Thank you!
The PDF book,
.tex files, and associated images and figures in directories
src/content are licensed under Creative Commons Attribution-ShareAlike 4.0 International License (cc by-sa).
The script files
scraper.py and others are licensed under GNU General Public License version 3 (for details, see LICENSE).