Skip to content
0:00 / 0:00

#recursionschemes#scala#functionalprogramming

Peeling the Banana: Recursion Schemes from First Principles - Zainab Ali

Lambda World

10K subscribers • 14 videos on Hallway

YouTube
  • Recommended by 2 people: 1 in engineering communities and 1 curated list.
  • Presented by Zainab Ali

Intermediate. Assumes working knowledge.

9.8K views8 years ago2 recommendations

Programming languagesComputer scienceFunctional programmingScalaAlgorithms

Zainab Ali explains recursion schemes, showing how to make recursion generic and separate business logic from traversal.

This presentation was given at Lambda World 2017 by Zainab Ali. Follow: -twitter.com/47deg -twitter.com/lambda_world -twitter.com/_zainabali_ Visit: -47deg.com/events for more details -lambda.world ___ Recursion is at the heart of every functional programmer's toolkit, but with it comes a lot of boilerplate. In the early 1990s, the seminal paper Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire (Erik Meijer, M.M. Fokkinga, and Ross Paterson) introduced a little-known technique known as recursion schemes. This technique makes recursion generic, removing much of the boilerplate associated with it, and cleanly separating business logic from recursive traversal. It paved the way to many different schemes, each for their own kind of recursive traversal. This talk explores the technique of recursion schemes and how to use it. We start with primitive recursion, briefly diving into folds, before deriving the catamorphism, a specific recursion schema for the right fold. We shall see that there is a rich zoo of recursion schemes for different types of folds, unfolds and more.

Why it's here

2 people recommend this

What people say. Recommended as an excellent, accessible introduction to recursion schemes from first principles.

Moments people linked to

u/ysangkokin r/haskell • Recommends

Peeling the Banana: Recursion Schemes from First Principles - Zainab Ali
64View on Reddit

programming-talkscurated list on GitHubRecommends

Under “Functional Programming”

Peeling the Banana: Recursion Schemes from First Principles 00:34:21 by **Zainab Ali** (2017)