Corecursion

Corecursion

In computer science, corecursion is a type of operation that is dual to recursion. Where recursion works backwards (analytically, deductively), working on large data (more properly, data further from a base case) by breaking it into smaller data and repeating until one reaches a base case, corecursion works forward (synthetically, inductively), starting from a base case and iteratively producing larger data (more properly, later data, further removed from a base case). Put simply, it is about algorithms using the data which they themselves produce, bit by bit, as they become available, and needed, to produce further bits of data.

Read more about Corecursion.