scalawithcats / scala-with-cats

Source code for Scala with Cats
http://underscore.io/books/scala-with-cats
398 stars 133 forks source link
book functional-programming scala

Functional Programming Strategies in Scala with Cats

Copyright Noel Welsh 2012-2024.

Artwork by Jenny Clements.

Published by Inner Product.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Portions of Functional Programming Strategies in Scala with Cats are based on Scala with Cats by Dave Pereira-Gurnell and Noel Welsh, which is licensed under CC BY-SA 4.0.

Overview

Functional Programming Strategies teaches the core concepts and techniques for building practical software in a functional programming style.

Building

The build requires a lot of heavy machinery: texlive, node, java, scala, and pandoc and pandoc-crossref. There are all installed as part of the CI job that builds the book. This is always kept up to date, so refer to it for dependencies and their installation.

Once you have the dependencies installed, run sbt to open an SBT prompt. From within sbt you can issue the following commands:

The pdf, html, and epub commands are each made of three smaller commands:

There are also tex and json commands (and commands like texSetup, jsonPandoc, and so on) that build a LaTeX version of the book and a Pandoc AST respectively. These are useful for debugging the build.

Contributing

If you spot a typo or mistake, please feel free to fork the repo and submit a Pull Request. Add yourself to contributors.md to ensure we credit you for your contribution.

If you don't have time to submit a PR or you'd like to suggest a larger change to the content or structure of the book, please raise an issue instead.