Cats is a library which provides abstractions for functional programming in Scala.
The name is a playful shortening of the word category.
Scala supports both object-oriented and functional programming, and this is reflected in the hybrid approach of the
standard library. Cats augments the standard library with tools that further enable functional programming such as
Traverse. A broader goal of Cats is to provide a foundation for an
ecosystem of pure, typeful libraries.
Cats is currently available for Scala 2.10, 2.11 and 2.12, and Scala.js.
To get started with SBT, simply add the following to your
libraryDependencies += "org.typelevel" %% "cats" % "0.9.0"
This will pull in all of Cats' modules. If you only require some
functionality, you can pick-and-choose from amongst these modules
(used in place of
cats-macros: Macros used by Cats syntax (required).
cats-kernel: Small set of basic type classes (required).
cats-core: Most core type classes and functionality (required).
cats-laws: Laws for testing type class instances.
cats-free: Free structures such as the free monad, and supporting type classes.
Release notes for Cats are available in CHANGES.md.
Cats is still under active development. While we don't anticipate any major redesigns, changes that are neither source nor binary compatible are to be expected in upcoming cats releases. We will update the minor version of cats accordingly for such changes. Once cats 1.0 is released (ETA: Q3 2016), there will be an increased focus on making changes in compatible ways.
Cats information and documentation is available on the website.
We also have a Scaladoc index.
Finally, we have a list of frequently-asked questions.
Our goal is to have clear and comprehensive documentation. If you notice problems, omissions, or errors, please let us know.
How can I contribute to Cats?
We welcome contributions to Cats and would love for you to help build Cats. See our contributor guide for more information about how you can get involed.
People are expected to follow the Typelevel Code of Conduct when discussing Cats on the Github page, Gitter channel, or other venues.
We hope that our community will be respectful, helpful, and kind. If you find yourself embroiled in a situation that becomes heated, or that fails to live up to our expectations, you should disengage and contact one of the project maintainers in private. We hope to avoid letting minor aggressions and misunderstandings escalate into larger problems.
If you are being harassed, please contact one of us immediately so that we can support you.
The current maintainers (people who can merge pull requests) are:
- ceedubs Cody Allen
- rossabaker Ross Baker
- johnynek P. Oscar Boykin
- travisbrown Travis Brown
- adelbertc Adelbert Chang
- peterneyens Peter Neyens
- tpolecat Rob Norris
- stew Mike O'Connor
- non Erik Osheim
- mpilquist Michael Pilquist
- milessabin Miles Sabin
- fthomas Frank Thomas
- julien-truffaut Julien Truffaut
- kailuowang Kailuo Wang
We are currently following a practice of requiring at least two sign-offs to merge PRs (and for large or contentious issues we may wait for more). For typos or other small fixes to documentation we relax this to a single sign-off.
There are many projects that integrate with Cats:
- Circe: pure functional JSON library.
- Dogs: pure functional collections and data structures.
- Fetch: efficient data access to heterogeneous data sources.
- Frameless: Expressive types for Spark.
- FS2: compositional, streaming I/O library
- Kittens: automatically derived type class instances.
- Monix: high-performance library for composing asynchronous and event-based programs.
- eff: functional effects and effect handlers (alternative to monad transformers).
Copyright and License
All code is available to you under the MIT license, available at http://opensource.org/licenses/mit-license.php and also in the COPYING file. The design is informed by many other projects, in particular Scalaz.
Copyright the maintainers, 2015-2016.