A Quick Start to Cats Library

Reading Time: 3 minutes

Hi everyone, recently I started exploring Cats library in Scala and so here I’m presenting you the first session on “Introduction to Cats”. It will give you a head start in Cats. Let me give you a brief description as well.

What is Functional Programming?

Functional programming (FP) is a style of software development emphasizing functions that don’t depend on program state. Functional code is easier to test and reuse, simpler to parallelize, and less prone to bugs than other code. In simple words, in functional programming we use pure functions only i.e they have no side-effects.

By no side-effect I mean that the function will only return a result and won’t do the following:

  • Modifying a variable
  • Modifying a data structure in place
  • Setting a field on an object
  • Throwing an exception or halting with an error
  • Printing to the console or reading user input
  • Reading from or writing to a file

What is Cats?

Cats is a library which provides an abstraction for functional programming in Scala. Its focus is on providing functional abstractions that are modular, approachable and efficient. A broader goal of Cats is to provide a foundation for an ecosystem of pure, typeful libraries to support functional programming in Scala applications.

Here are slides for you:

Here is the session recording for you:

I hope the session will be helpful to you and you will get a kickstart in Cats. There will be more sessions soon. So, stay tuned!

Knoldus-blog-footer-image

Written by 

Muskan Gupta is a Software Consultant having almost 1-year experience. She has knowledge of languages like C, C++, Java and Scala. She is familiar with Object-Oriented Programming Paradigms and also has an interest in relational database technologies. Her hobbies include travelling, reading novels and listening to music.

Leave a Reply