{"id":295,"url":"https://github.com/passy/awesome-recursion-schemes","last_synced_at":"2025-03-03T09:31:12.527Z","repository":{"id":53444273,"uuid":"77713737","full_name":"passy/awesome-recursion-schemes","owner":"passy","description":"Resources for learning and using recursion schemes.","archived":false,"fork":false,"pushed_at":"2024-04-25T20:21:03.000Z","size":58,"stargazers_count":1198,"open_issues_count":6,"forks_count":56,"subscribers_count":45,"default_branch":"master","last_synced_at":"2024-05-20T05:09:16.322Z","etag":null,"topics":["awesome","catamorphisms","recursion-schemes"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/passy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-30T22:30:14.000Z","updated_at":"2024-05-29T10:50:04.552Z","dependencies_parsed_at":"2024-05-29T11:00:09.357Z","dependency_job_id":null,"html_url":"https://github.com/passy/awesome-recursion-schemes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passy%2Fawesome-recursion-schemes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passy%2Fawesome-recursion-schemes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passy%2Fawesome-recursion-schemes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passy%2Fawesome-recursion-schemes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/passy","download_url":"https://codeload.github.com/passy/awesome-recursion-schemes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241640354,"owners_count":19995545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awesome","catamorphisms","recursion-schemes"],"created_at":"2024-01-05T20:12:51.228Z","updated_at":"2025-03-03T09:31:12.490Z","avatar_url":"https://github.com/passy.png","language":null,"readme":"# Awesome Recursion Schemes [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)\n\n\u003e A curation of useful resources for learning about and using recursion schemes.\n\nRecursion schemes are simple, composable combinators, that automate the process of traversing and recursing through nested data structures.\n\n\n## Contents\n\n- [Introductions](#introductions)\n- [Articles](#articles)\n- [Papers](#papers)\n- [Presentations](#presentations)\n- [Cheat Sheets](#cheat-sheets)\n- [Podcasts](#podcasts)\n- [Implementations](#implementations)\n\n\n## Introductions\n\n- [Awesome Recursion Schemes](https://github.com/passy/awesome-recursion-schemes) - A curation of useful resources for learning about and using recursion schemes.\n- [Practical Recursion Schemes](https://jtobin.io/practical-recursion-schemes) -\n  Introduction to pattern functors, fix points, anamorphisms, catamorphisms,\n  paramorphisms and hylomorphisms, requiring very little prior knowledge.\n- [An Introduction to Recursion Schemes](http://blog.sumtypeofway.com/an-introduction-to-recursion-schemes/) -\n  Three-part series in which you discover recursion schemes from scratch and\n  implement a small subset of Edward Kmett's library.\n- [Understanding Algebras](https://www.schoolofhaskell.com/user/bartosz/understanding-algebras) -\n  Bartosz Milewski explains F-algebras and shows how to use them in the context of\n  catamorphisms.\n- [Recursion Schemes in JavaScript and Flow](https://medium.com/@JosephJnk/recursion-schemes-in-javascript-and-flow-with-static-land-recursision-schemes-97cf10599fb7) -\n  Series introducing recursion schemes and related concepts in JavaScript,\n  aimed at developers with a minimal functional programming background.\n\n## Articles\n\n- [Recursion Schemes: A Field Guide (Redux)](http://comonad.com/reader/2009/recursion-schemes/) -\n  List of various recursion schemes with code samples.\n- [Catamorphisms](https://wiki.haskell.org/Catamorphisms) - Definition on the Haskell Wiki.\n- [Catamorphisms](https://www.schoolofhaskell.com/user/edwardk/recursion-schemes/catamorphisms) -\n  Short definition with code on School of Haskell by Edward Kmett.\n- [Rotating Squares](https://jtobin.io/rotating-squares) - Using a hylomorphism to rotate a quadtree by Jared Tobin.\n- [Recursion Schemes, Part V: Hello, Hylomorphisms](http://blog.sumtypeofway.com/recursion-schemes-part-v/)\n- [Promorphisms, Pre and Post](https://jtobin.io/promorphisms-pre-post) - Practical examples of pre- and postpromorphisms by Jared Tobin.\n- [Time Traveling Recursion Schemes](https://jtobin.io/time-traveling-recursion) - Exploring histo and futu by example by Jared Tobin.\n- [Recursion Schemes, Part IV: Time is of the Essence](http://blog.sumtypeofway.com/recursion-schemes-part-iv-time-is-of-the-essence/) - Practical article about histomorphism and the futumorphism.\n- [Cheat Sheet](https://github.com/sellout/recursion-scheme-talk/blob/master/cheat%20sheet.pdf) - Map of various recursion schemes and their duals.\n- [Correcting the Visitor pattern](http://logji.blogspot.co.uk/2012/02/correcting-visitor-pattern.html) - Showing that the Visitor pattern implements an f-algebra for use with a catamorphism (in Java).\n- [Recursion Schemes in Scala](https://free.cofree.io/2017/11/13/recursion/) - Introduces the fixpoint combinator, anamorphism, catamorphism, hylomorphism, paramorphism, apomorphism, histomorphism, dynamorphism and futumorphism.\n- [What's in a Fold: The Basic Catamorphism in recursion-schemes](https://duplode.github.io/posts/whats-in-a-fold.html) - Introduces catamorphism as a generalization of fold.\n\n### Hylomorphisms in the Wild\n\nArticles by Bartosz Milewski about solving small, practical problems by applying a hylomorphism.\n\n- [Stalking a Hylomorphism in the Wild](https://bartoszmilewski.com/2017/12/29/stalking-a-hylomorphism-in-the-wild/) - Advent of Code 2017, Domino challenge\n- [Open Seasons on Hylomorphisms](https://bartoszmilewski.com/2018/12/20/open-season-on-hylomorphisms/) - Advent of Code 2018, String comparison challenge\n\n## Papers\n\n- [Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire, 1991, Meijer et al.](http://maartenfokkinga.github.io/utwente/mmf91m.pdf) -\n  The original paper most of this is based on.\n- [A Duality of Sorts, 2013, Hinze et al.](http://www.cs.ox.ac.uk/ralf.hinze/publications/Sorting.pdf) -\n  Shows that many basic sorting algorithms exist as a pair, and that these pairs\n  arise naturally out of the duality between folds and unfolds.\n- [Sorting with Bialgebras and Distributive Laws, 2012, Hinze et al.](http://www.cs.ox.ac.uk/people/daniel.james/sorting/sorting.pdf) -\n  Shows how paramorphisms and apomorphisms can be used for more efficient\n  implementations of sorting algorithms.\n- [Scrap your boilerplate: a practical design pattern for generic programming, 2003, SPJ et al.](http://research.microsoft.com/en-us/um/people/simonpj/Papers/hmap/hmap.ps) -\n  Design pattern for writing programs that traverse data structures built from rich mutually-recursive data types.\n\n## Presentations\n\n- [Slidedecks by Tim Philip Williams](http://www.timphilipwilliams.com/slides.html) -\n  \"Recursion Schemes by Example\" and \"Exotic Tools for Exotic Trades\" provide\n  concise definitions as well as practical examples of many recursion schemes.\n- [Unifying Structured Recursion Schemes](https://www.youtube.com/watch?v=9EGYSb9vov8) -\n  12 min presentation by Ralf Hinze, Nicolas Wu, and Jeremy Gibbons.\n- [Recursion Schemes](https://www.youtube.com/watch?v=Zw9KeP3OzpU) -\n  Presented by Tim Williams at the London Haskell meetup.\n- [F-algebras or: How I Learned to Stop Worrying and Love the Type System](https://www.youtube.com/watch?v=PK4SOaAGVfg) -\n  Presented by Anthony Burzillo at the NYC Haskell User's Group.\n- [A Gentle Introduction to Recursion Schemes](https://www.youtube.com/watch?v=i5A2Amfcir8) -\n  Presented by Jean Remi Desjardins at Lambdaconf 2016.\n- [recursion-scheme-talk](https://github.com/sellout/recursion-scheme-talk) - Collection of slide decks about recursion schemes.\n- [Bracer: Transforming Real-World Languages with Coproducts and Recursion Schemes](https://www.youtube.com/watch?v=5Kr7IykGMzU) - High-level talk about structuring programs with coproducts and recursion schemes by Patrick Thomson.\n- [Recursion: Where Functional Programming Hits Bottom](https://www.youtube.com/watch?v=24UoRaoKLjM) - Introduction to recursive fix point data structures and recursion schemes in Haskell and Scala by Greg Pfeil.\n- [Programming with algebras](https://www.youtube.com/watch?v=-98fR9VmLbQ) - Bartosz Milewski's article in talk form, presented at LambdaCon.\n- [Peeling the Banana: Recursion Schemes from First Principles](https://www.youtube.com/watch?v=XZ9nPZbaYfE\u0026t=3s) - Zainab Ali's Introductory talk presented at LambdaWorld.\n\n## Cheat Sheets\n\n- [The Hitchhiker's Guide to Morphisms](https://ipfs.io/ipfs/QmTppu1VDAQWsdiyVSZX6qb8PErdpwzNP2oKfEhcgaBvWR/guide-to-morphisms.pdf) - Overview of different morphisms including a printable PDF.\n\n## Podcasts\n\n- [Magic Read Along](http://www.magicreadalong.com/) - Casual discussions about\n  category theory that often bring up recursion schemes, including [episode\n  33](http://www.magicreadalong.com/episode/33) which talks about Histomorphisms\n  and Futumorphisms.\n- [Scala Love](https://scala.love/) - Podcast about Scala that brings up\n  recursion schemes in [the second episode](https://scala.love/happy-valentin/).\n- [The Haskell Cast](https://www.haskellcast.com/) - Recursion schemes come up in\n  [Episode 13 with John Wiegley](https://www.haskellcast.com/episode/013-john-wiegley-on-categories-and-compilers).\n\n## Implementations\n\n- [recursion-schemes](https://github.com/ekmett/recursion-schemes/) for\n  Haskell - The canonical implementation by Edward Kmett.\n- [Matryoshka](https://github.com/slamdata/matryoshka) for Scala using Scalaz -\n  Generalized folds, unfolds, and traversals for fixed point data structures.\n- [andyscott/droste](https://github.com/andyscott/droste) for Scala using Cats -\n  Generalized folds, unfolds, and traversals for fixed point data structures.\n- [recursion\\_schemes](https://github.com/vmchale/recursion_schemes/) for\n  Idris, based off Edward Kmett's Haskell library.\n- [purescript-matryoshka](https://github.com/slamdata/purescript-matryoshka) for PureScript -\n  Work-in-process port of matryoshka.\n- [recursion](https://github.com/vmchale/recursion) for ATS - Demonstration of\n  recursion schemes in ATS.\n- [dada](https://github.com/sellout/dada) for Dhall - a library for recursion\n  schemes in Dhall.\n- [static-land-recursion-schemes](https://github.com/JosephJNK/static-land-recursion-schemes) for JavaScript/Flow -\n  Schemes for data structures written in the style of [flow-static-land](https://github.com/gcanti/flow-static-land).\n- [Katalyst](https://github.com/aedans/Katalyst) for Kotlin - a re-envisioning based off Matryoshka using lightweight higher kinded polymorphism.\n\n## License\n\nThis content is licensed\nunder [CC0](https://creativecommons.org/publicdomain/zero/1.0/).\n","funding_links":[],"categories":["Theory","Computer Science","Technical","Others","awesome","理论","Uncategorized","Live Site:   [searchAwesome](https://search-awesome.vercel.app/)","Other Lists","Themed Directories"],"sub_categories":["awesome-*","Automated Machine Learning","Uncategorized","TeX Lists"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassy%2Fawesome-recursion-schemes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpassy%2Fawesome-recursion-schemes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassy%2Fawesome-recursion-schemes/lists"}