Connecting...

Pexels Photo 167698

How to fold a forest by Greg McKay

Pexels Photo 167698

One of the amazing things about programming is how many different libraries there are to use meaning there is so much variety!

In this talk by Software Engineer Greg McKay, you are introduced to the library Matryoska which provides many recursion schemes. Find out about fixed-point types and how exactly we can use them to define data structures.



How to fold a forest
Recursion is one of the most fundamental aspects of functional programming and perhaps the most useful method of recursion is the fold. Recursion schemes are a way of generalising folds and unfolds. Abstracting away recursive function calls can help to simplify the underlying ideas in the code; think foldLeft vs standard recursion. However learning about them can be daunting, especially when faced with elaborate names and type signatures. 

This talk will be a basic introduction to the library Matryoska which provides many recursion schemes. Along the way we will learn about fixed point types and how they can be used to define common data structures.


This talk was given by Greg McKay at Scala in the City.


Looking for more Scala in the City talks? Software Engineer Viktor Lövgren told us all about 'Replacing Akka Actors with Cats Effect and FS2'. Watch it here.