A for-loop is somewhat similar to an inductive argument. Just as the truth of a proposition P(n + 1) depends on the truth of P(n), the correctness of iteration n+1 of a for-loop de...
Generalized algebraic data types (GADTs), sometimes known as "guarded recursive data types" or "first-class phantom types", are a simple but powerful generaliz...
Simon L. Peyton Jones, Dimitrios Vytiniotis, Steph...
This paper introduces a pattern for almost compositional functions over recursive data types, and over families of mutually recursive data types. Here "almost compositional&q...