HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Package5.2.3ControlRecursion

recursion-schemes

Representing common recursion patterns as higher-order functions

  • Version5.2.3
  • CategoryControl, Recursion
  • LicenceBSD-2-Clause
  • AuthorEdward A. Kmett
  • Maintainer"Samuel Gélineau" <gelisam@gmail.com>, "Ryan Scott" <ryan.gl.scott@gmail.com>, "Luc Tielen" <luc.tielen@gmail.com>, "Erik de Castro Lopo" <erikd@mega-nerd.com>
  • Homepagegithub.com/ekmett/recursion-schemes
  • Pinned byhackage recursion-schemes 5.2.3
  • Sourcerecursion-schemes-5.2.3 on Hackage

Modules

Description

Many recursive functions share the same structure, e.g. pattern-match on the input and, depending on the data constructor, either recur on a smaller input or terminate the recursion with the base case. Another one: start with a seed value, use it to produce the first element of an infinite list, and recur on a modified seed in order to produce the rest of the list. Such a structure is called a recursion scheme. Using higher-order functions to implement those recursion schemes makes your code clearer, faster, and safer. See README for details.

Depends on

8 packages

Used by in this set · 0

Nothing in this set depends on it.