Programming Search⌘K

Conceptcore

Continuation-passing style

Also called CPS, continuation, continuations, CPS transform, callback style, call/cc.

In continuation-passing style a function does not return; it passes its result to an extra argument, the continuation, which is a function that does the rest of the computation.

Applies to
core-languages

Idea

In continuation-passing style (CPS), a function does not return its result. It takes an extra argument, the continuation, which is a function that stands for the rest of the computation, and it calls the continuation with the result. A direct-style factorial returns n * fact(n - 1); a CPS factorial calls fact_k(n - 1, k2), where the new continuation k2 multiplies by n and passes the product to the old continuation k. Every call in CPS is a tail call, and the order of every step is explicit. Compilers use CPS as an intermediate form, interpreters use it to implement exceptions, generators and call/cc, and asynchronous code uses it as callbacks.

def fact(n):  # direct style: the function returns its result
    return 1 if n == 0 else n * fact(n - 1)


def fact_k(n, k):  # CPS: the function passes its result to k
    if n == 0:
        return k(1)
    return fact_k(n - 1, lambda r: k(n * r))


print(fact(5), fact_k(5, lambda r: r))
fact_k(5, lambda r: print("the continuation got", r))

done = []


def product_k(xs, k, abort):
    if not xs:
        return k(1)
    if xs[0] == 0:
        return abort(0)  # skip every pending multiplication

    def rest(r):
        done.append(xs[0])
        return k(xs[0] * r)

    return product_k(xs[1:], rest, abort)


identity = lambda r: r
print(product_k([2, 3, 4], identity, identity), done)
done.clear()
print(product_k([2, 3, 0, 4], identity, identity), done)


def safe_div(a, b, ok, fail):  # two continuations: one for each outcome
    return fail("division by zero") if b == 0 else ok(a / b)


safe_div(1, 4, lambda v: print("ok", v), lambda e: print("error:", e))
safe_div(1, 0, lambda v: print("ok", v), lambda e: print("error:", e))
Output
120 120
the continuation got 120
24 [4, 3, 2]
0 []
ok 0.25
error: division by zero

fact waits for the recursive call to return and then multiplies. fact_k multiplies inside the continuation, so each call hands over all the remaining work and never needs to come back. The caller chooses what happens to the result: the identity function returns it, and the second continuation prints it. product_k takes two continuations: k for the normal result and abort for a zero. When it meets a zero, it calls abort, and the multiplications that wait in the chain of continuations never run, so done stays empty. safe_div uses two continuations in place of a return value and an exception.

How it works

The continuation is the rest of the program. At each point of a computation, something waits for the value that the current expression computes. The Scheme report puts it this way: "Whenever a Scheme expression is evaluated there is a continuation wanting the result of the expression. The continuation represents an entire (default) future for the computation."1 In direct style the continuation is implicit: it is the return address and the stack frames below it. CPS makes it a value that the program can pass, store, call once, call twice or never call.

The CPS transform. A mechanical translation turns any direct-style program into CPS. Each function gets an extra parameter k. A function that returns e becomes a function that calls k(e). A call whose result is used later, as in n * f(x), becomes a call to f_k(x, lambda r: ...), and the code that used the result moves into the new continuation. After the transform, every call is a tail call, every intermediate value has a name, and the order of evaluation is fixed by the nesting of the continuations. Reynolds lists the uses: continuations "underlie a method of program transformation (into continuation-passing style), a style of definitional interpreter (defining one language by an interpreter written in another language), and a style of denotational semantics".2 See order of evaluation.

Control flow becomes function calls. Because the rest of the program is a value, any jump is a call to the right continuation. An early exit calls an outer continuation and skips the inner ones, as product_k does. An exception handler is a second continuation that every function passes down, and raise calls it. A generator keeps the continuation of its loop and calls it when the consumer asks for the next item. Backtracking keeps a continuation for each choice that it has not tried yet. Scheme's call-with-current-continuation gives direct-style code access to its own continuation, and the report notes that it "is useful for implementing a wide variety of advanced control structures".1 See exception handling and iterators.

The stack in CPS. CPS does not remove the stack; it moves it into the chain of continuation closures on the heap. In a language that eliminates tail calls, such as Scheme, a CPS program runs in constant stack space. In Python, Java, C# and JavaScript, each call still pushes a frame, so a deep CPS recursion overflows the stack sooner than the direct version, because it nests the calls to the continuations as well. A trampoline fixes this: each step returns the next step as a function, and a loop runs the steps. The Python example file shows a trampoline.

Callbacks are continuations. An asynchronous operation cannot return its result, because the result does not exist yet when the call returns. So the operation takes a callback and calls it later. The Node.js documentation describes it: "A callback is a simple function that's passed as a value to another function, and will only be executed when the event happens."3 Node.js passes errors as the first argument of the callback, a convention it calls "error-first callbacks".3 Long chains of such callbacks nest deeply and are hard to read, so promises and async/await came to hide them. An async function treats the code after each await as a continuation, so the programmer writes direct style and the program runs in CPS. See async/await and futures.

In languages

LanguageVerdictNote
PythonIdiom
C++Idiom
JavaIdiom
CIdiom
C#Idiom
JavaScriptIdiom
TypeScriptIdiomAs JavaScript; a continuation has a function type that states its parameters, such as an error or null and a value, and the compiler checks the arguments of each call.
GoIdiom
RustIdiom
KotlinIdiomLambdas and function types make continuations easy to pass, and the compiler turns every suspend function into CPS with an extra Continuation parameter; no example file because kotlinc is not installed on the machine that recorded the examples.
SQLDoes not applyA query has no functions as values to pass as continuations.
BashIdiomA function can take the name of another function as an argument and call it with the result, but the result must be text.
PowerShellIdiomA script block is a value, so a function can take one as its continuation and call it with & or Invoke; no example file because pwsh is not installed on the machine that recorded the examples.
HTMLDoes not applyHTML is markup with no functions.
CSSDoes not applyCSS is a language of rules with no functions as values.
Regular expressionsDoes not applyA pattern has no functions or control flow to pass.
Language Verdict Mechanism
Python idiom functions as arguments; a trampoline for depth
JavaScript idiom callbacks; error-first callbacks in Node.js; await
TypeScript idiom as JavaScript, with typed callbacks
Java idiom Function and Consumer; CompletableFuture.thenApply
Kotlin idiom lambdas; the compiler turns suspend functions into CPS
C# idiom Func and Action delegates; Task.ContinueWith
Go idiom function values; growing goroutine stacks
Rust idiom closures; Box<dyn FnOnce> for recursive CPS
C idiom a function pointer and a void * for its data
C++ idiom lambdas as template parameters; std::function
Bash idiom the name of a function passed as an argument
PowerShell idiom script blocks passed as arguments
SQL n/a no functions as values
Regex n/a no functions or control flow
HTML n/a no functions
CSS n/a no functions as values

Every core language with first-class functions can write CPS by hand, so the verdict is idiom for all of them. None of them offers a first-class continuation of the current point of the program, as call/cc in Scheme does. The languages differ in two ways. The first is depth: Go grows its stacks, so a deep CPS recursion runs, while Python, Java, C# and JavaScript overflow and need a trampoline. The second is types: Rust and C++ give each closure its own type, so a recursive CPS function must take a boxed dyn FnOnce or a std::function, and the Rust example file shows the compile error of the generic version.

CPS is also the hidden form of the asynchronous features of these languages. The compilers of C#, Rust and Kotlin turn an async or suspend function into a state machine whose states are the continuations after each await. JavaScript and Python engines keep the suspended frame of the function and resume it when the awaited value is ready. In both designs, the code after each await is the continuation. Kotlin makes the transform visible: each suspend function gets an extra Continuation parameter in the compiled code.

PythonGitHub
def sum_k(n, k):  # CPS, but every call still uses a Python stack frame
    if n == 0:
        return k(0)
    return sum_k(n - 1, lambda r: k(n + r))


try:
    sum_k(100_000, lambda r: r)
except RecursionError:
    print("RecursionError")


def sum_t(n, k):  # the same function, but it returns the next step instead of calling it
    if n == 0:
        return lambda: k(0)
    return lambda: sum_t(n - 1, lambda r: lambda: k(n + r))


def trampoline(step):
    while callable(step):
        step = step()
    return step


print(trampoline(sum_t(100_000, lambda r: r)))
Output
RecursionError
5000050000

This code runs but gives a wrong answer on purpose.

def abs_k(x, k):
    if x < 0:
        return k(-x)
    return x  # returns instead of calling the continuation


times_ten = lambda v: v * 10
print(abs_k(-3, times_ten), abs_k(3, times_ten))
Output
30 3
  • Verdict: idiom. Python has first-class functions and closures, so a function can take its continuation as a parameter, as sum_k does. CPython has no tail call elimination and limits the depth of the stack, so a CPS function that calls itself 100,000 times raises RecursionError. The trampoline fixes this: each step returns a function for the next step instead of calling it, and a loop runs the steps one at a time on a flat stack.
  • The wrong block forgets the rule of CPS on one path. abs_k calls k for a negative number but returns the plain value for a positive one, so abs_k(3, times_ten) gives 3, not 30. In CPS, every path must end in a call to a continuation.
#include <charconv>
#include <functional>
#include <iostream>
#include <string>
#include <string_view>

// std::function gives every continuation one type, so fact can call itself.
long fact(long n, const std::function<long(long)>& k)
{
    if (n == 0) return k(1);
    return fact(n - 1, [&](long r) { return k(n * r); });
}

// Two continuations as template parameters: no allocation, and calls the compiler can inline.
template <class Ok, class Fail>
auto parse(std::string_view s, Ok ok, Fail fail)
{
    int n = 0;
    auto [end, ec] = std::from_chars(s.data(), s.data() + s.size(), n);
    if (ec != std::errc{} || end != s.data() + s.size()) return fail(s);
    return ok(n);
}

int main()
{
    std::cout << fact(5, [](long r) { return r; }) << '\n';
    std::cout << fact(5, [](long r) { return r * 2; }) << '\n';
    for (std::string_view s : {"42", "4x"}) {
        std::cout << parse(
            s, [](int n) { return "ok " + std::to_string(n + 1); },
            [](std::string_view bad) { return "error: not a number: " + std::string(bad); })
                  << '\n';
    }
}
Output
120
240
ok 43
error: not a number: 4x
  • Verdict: idiom. Lambdas are continuations, and parse takes them as template parameters, so each call site gets its own copy of parse with the continuations inlined. The two lambdas must return the same type, because parse returns the result of either.
  • A recursive CPS function needs one type for all its continuations, as in Rust, so fact takes a std::function. Each lambda captures k and n by reference, which is safe only because every continuation runs before fact returns. A continuation that is stored and run later must capture by value.
JavaGitHub
import java.util.List;
import java.util.function.Function;
import java.util.function.IntFunction;
import java.util.function.Supplier;

public class Main {
    // CPS: the result goes to k, and k decides what happens next
    static <R> R fact(int n, Function<Integer, R> k) {
        if (n == 0) return k.apply(1);
        return fact(n - 1, r -> k.apply(n * r));
    }

    // two continuations: one for a match, one for no match
    static <R> R find(List<String> xs, String prefix, IntFunction<R> found, Supplier<R> missing) {
        for (int i = 0; i < xs.size(); i++)
            if (xs.get(i).startsWith(prefix)) return found.apply(i);
        return missing.get();
    }

    public static void main(String[] args) {
        int n = fact(5, r -> r);
        String s = fact(5, r -> "5! = " + r);
        System.out.println(n + " " + s);
        List<String> files = List.of("a.txt", "b.png", "c.txt");
        System.out.println(find(files, "b", i -> "found at " + i, () -> "not found"));
        System.out.println(find(files, "z", i -> "found at " + i, () -> "not found"));
        try {
            fact(100_000, r -> r);
        } catch (StackOverflowError e) {
            System.out.println("StackOverflowError");
        }
    }
}
Output
120 5! = 120
found at 1
not found
StackOverflowError
  • Verdict: idiom. A continuation in Java is an object of a functional interface such as Function, IntFunction or Supplier, and a lambda creates one. fact is generic in the result type R, so the same function returns a number to one caller and a string to another. find takes two continuations and calls exactly one of them, which replaces a return value that could be absent.
  • The JVM does not eliminate tail calls, so each step of fact adds a stack frame, and 100,000 steps throw StackOverflowError. CompletableFuture.thenApply and thenCompose are the standard library form of CPS for asynchronous work: each takes the continuation for the result of a future.
#include <stdio.h>
#include <stdlib.h>

/* A continuation is a function pointer and the data that it needs. */
typedef void (*cont)(long result, void *env);

struct frame { long n; cont k; void *env; };

static void times_n(long r, void *p)
{
    struct frame *f = p;
    f->k(f->n * r, f->env);
}

static void fact(long n, cont k, void *env)
{
    if (n == 0) {
        k(1, env);
        return;
    }
    struct frame f = { n, k, env };
    fact(n - 1, times_n, &f);   /* f lives until its continuation has run */
}

static void print_with(long r, void *env) { printf("%s%ld\n", (const char *)env, r); }
static void store(long r, void *env) { *(long *)env = r; }

/* Two continuations: one for success, one for failure. */
static void parse(const char *s, void (*ok)(long), void (*fail)(const char *))
{
    char *end;
    long n = strtol(s, &end, 10);
    if (*s == '\0' || *end != '\0')
        fail(s);
    else
        ok(n);
}

static void ok(long n) { printf("ok %ld\n", n + 1); }
static void fail(const char *s) { printf("error: not a number: %s\n", s); }

int main(void)
{
    fact(5, print_with, "5! = ");
    long out = 0;
    fact(10, store, &out);
    printf("10! = %ld\n", out);
    parse("42", ok, fail);
    parse("4x", ok, fail);
    return 0;
}
Output
5! = 120
10! = 3628800
ok 43
error: not a number: 4x
  • Verdict: idiom. C has no closures, so a continuation is a pair: a function pointer and a void * that points to its data. The frame struct holds what a closure would capture, the number and the next continuation. The C library uses the same pair for callbacks, as qsort takes a comparison function and POSIX pthread_create takes a start function and its argument.
  • The frames live on the stack, which is safe here because every continuation runs before fact returns. A continuation that runs later, after an event, must have its data on the heap, and the code that runs it must free the data.
using System;
using System.Threading.Tasks;

// CPS: the result goes to k, and k decides what happens next
static R Fact<R>(int n, Func<long, R> k) => n == 0 ? k(1) : Fact(n - 1, r => k(n * r));

// two continuations: one for success, one for failure
static void Parse(string s, Action<int> ok, Action<string> fail)
{
    if (int.TryParse(s, out int n)) ok(n);
    else fail($"not a number: {s}");
}

Console.WriteLine(Fact(5, r => r));
Console.WriteLine(Fact(5, r => $"5! = {r}"));
foreach (string s in new[] { "42", "4x" })
    Parse(s, n => Console.WriteLine($"ok {n + 1}"), e => Console.WriteLine($"error: {e}"));

// ContinueWith runs a continuation when the task has its result
Task<int> task = Task.Run(() => 6 * 7);
string text = await task.ContinueWith(done => $"the task gave {done.Result}");
Console.WriteLine(text);
Output
120
5! = 120
ok 43
error: not a number: 4x
the task gave 42
  • Verdict: idiom. A continuation in C# is a delegate, Func<T, R> when it gives a result and Action<T> when it does not, and a lambda creates one. Fact is generic in the result type, and Parse calls exactly one of its two continuations.
  • Task.ContinueWith attaches a continuation to a task. The compiler turns every async method into a state machine whose rest of the method is the continuation of each await, so C# programs use CPS through await without writing it by hand.
JavaScriptGitHub
import { promisify } from "node:util";

function parsePort(text, callback) { // error-first continuation
  setImmediate(() => {
    const n = Number(text);
    if (!Number.isInteger(n) || n < 1 || n > 65535) callback(new Error(`bad port: ${text}`));
    else callback(null, n);
  });
}

parsePort("8080", (err, port) => console.log("callback:", err ? err.message : port));
parsePort("http", (err, port) => console.log("callback:", err ? err.message : port));

const parsePortAsync = promisify(parsePort); // the same function, as a promise
try {
  console.log("await:", await parsePortAsync("443"));
  await parsePortAsync("99999");
} catch (e) {
  console.log("await:", e.message);
}
Output
callback: 8080
callback: bad port: http
await: 443
await: bad port: 99999

This code runs but gives a wrong answer on purpose.

function root(n, callback) {
  if (n < 0) callback(new Error("negative"));
  callback(null, Math.sqrt(n)); // runs even after the error
}

root(-4, (err, v) => console.log(err ? `error: ${err.message}` : `value: ${v}`));
Output
error: negative
value: NaN
  • Verdict: idiom. Node.js passes the result of every asynchronous operation of its older APIs to a callback, which is a continuation. The convention is error-first: the callback takes an error, or null, as its first argument and the value as its second. util.promisify turns such a function into one that returns a promise, and await then lets the caller write the code in direct style while the engine still runs it as continuations.
  • The wrong block calls its continuation twice. After the error, root does not return, so it also calls the callback with Math.sqrt(-4), and the caller sees an error and then the value NaN. Write return callback(...), so that each path calls the continuation exactly once.
package main

import (
	"errors"
	"fmt"
	"strconv"
)

// factK passes n! to k instead of returning it.
func factK(n int, k func(int) int) int {
	if n == 0 {
		return k(1)
	}
	return factK(n-1, func(r int) int { return k(n * r) })
}

// parseK has one continuation for success and one for failure.
func parseK(s string, ok func(int), fail func(error)) {
	n, err := strconv.Atoi(s)
	if err != nil {
		fail(errors.New("not a number: " + s))
		return
	}
	ok(n)
}

// sumK adds 1..n; each step wraps the continuation in a new closure.
func sumK(n int, k func(int) int) int {
	if n == 0 {
		return k(0)
	}
	return sumK(n-1, func(r int) int { return k(n + r) })
}

func main() {
	fmt.Println(factK(5, func(r int) int { return r }))
	fmt.Println(factK(5, func(r int) int { return r * 2 }))
	for _, s := range []string{"42", "4x"} {
		parseK(s,
			func(n int) { fmt.Println("ok", n+1) },
			func(err error) { fmt.Println("error:", err) })
	}
	fmt.Println(sumK(1_000_000, func(r int) int { return r })) // the stack grows, so deep CPS works
}
Output
120
240
ok 43
error: not a number: 4x
500000500000
  • Verdict: idiom. Go functions are values and close over their variables, so a continuation is a parameter of type func(int) int. parseK takes one continuation for success and one for failure, a style that Go code mostly writes as an (int, error) return value instead.
  • Go has no tail call elimination either, but goroutine stacks grow on demand, so sumK can nest a million calls where Python and Java run out of stack. Each step allocates a closure on the heap, so the CPS version is much slower than a loop.
RustGitHub
// A boxed closure, so every step has the same type.
fn fact(n: u64, k: Box<dyn FnOnce(u64) -> u64>) -> u64 {
    if n == 0 {
        k(1)
    } else {
        fact(n - 1, Box::new(move |r| k(n * r)))
    }
}

// Two continuations: one for success, one for failure.
fn parse<R>(s: &str, ok: impl FnOnce(i32) -> R, fail: impl FnOnce(String) -> R) -> R {
    match s.parse::<i32>() {
        Ok(n) => ok(n),
        Err(e) => fail(format!("{s}: {e}")),
    }
}

fn main() {
    println!("{}", fact(5, Box::new(|r| r)));
    println!("{}", fact(20, Box::new(|r| r)));
    for s in ["42", "4x"] {
        let msg = parse(s, |n| format!("ok {}", n + 1), |e| format!("error: {e}"));
        println!("{msg}");
    }
}
Output
120
2432902008176640000
ok 43
error: 4x: invalid digit found in string

This code does not compile, on purpose.

// Each call makes a new closure type, so the compiler must make a new
// copy of fact for every level, without end.
fn fact<K: FnOnce(u64) -> u64>(n: u64, k: K) -> u64 {
    if n == 0 {
        k(1)
    } else {
        fact(n - 1, move |r| k(n * r))
    }
}

fn main() {
    println!("{}", fact(5, |r| r));
}
  • Verdict: idiom. Closures in Rust capture their environment and implement FnOnce, so a function can take its continuation as a parameter, as parse does. A generic parameter costs nothing at run time, because the compiler makes a copy of parse for each pair of closures and can inline them.
  • Recursive CPS needs a box. The failing block makes fact generic in its continuation, but each level wraps k in a new closure, which is a new type, and the compiler stops when it reaches its limit for nested copies. Box<dyn FnOnce> gives all the continuations one type, at the cost of a heap allocation and an indirect call for each step.
  • First-class continuations. Scheme's call/cc and the callCC of Haskell's Cont monad capture the current continuation of direct-style code as a value. A program can store it and call it later to return to that point.
  • Delimited continuations. shift and reset and similar operators capture the continuation only up to a marked point, so the captured part is an ordinary function that returns. Effect handlers in OCaml 5 and other languages build on them.
  • CPS as an intermediate language. Compilers for Scheme, ML and other functional languages convert the program to CPS, because every value has a name and every jump is explicit. Static single assignment form, used by most compilers today, is closely related. See bytecode.
  • Defunctionalization. The closures of a CPS program can become a data type with one case for each kind of continuation, which turns a recursive interpreter into a loop with an explicit stack. See tree-walking interpreter.
  • Callbacks and promises. Asynchronous APIs pass continuations as callbacks. A promise holds a list of continuations and calls them when it settles. See futures.
  • Coroutines and generators. A suspended coroutine is a continuation that the runtime stores, and resuming the coroutine calls it.
  • Monads. The bind operation of a monad takes the rest of the computation as a function, which is CPS in a typed form. See higher-order functions.
  • Tail calls. CPS needs proper tail calls to run in constant stack space. See recursion.

Pitfalls

  • A path that forgets the continuation. If one branch returns a value instead of calling k, the rest of the program never runs on that branch, or runs with the wrong value. The wrong block in the Python file shows this.
  • A continuation called twice. A callback that falls through after an error calls the continuation a second time with a wrong value. The wrong block in the JavaScript file shows this. Return at the point where the continuation is called.
  • Stack overflow. Without tail call elimination, CPS uses more stack than the direct version. Use a trampoline, a loop, or a language that eliminates tail calls.
  • Callback nesting. Each step of an asynchronous sequence adds a level of indentation, and error handling repeats at every level. Use promises, async/await or named functions.
  • Lost errors. An exception thrown inside a callback does not reach the try of the code that started the operation, because that code has already returned. Pass errors to a continuation, or use promises that carry them.
  • Captures that outlive their data. A continuation that runs later must not hold pointers or references to stack data that is gone. The C and C++ example files use the stack only because every continuation runs before the function returns.

Cost

A call in CPS costs the same as a call in direct style, plus the creation of a closure for each new continuation. In most languages that is a heap allocation for each step, which makes a hand-written CPS loop several times slower than the direct loop, and it adds work for the garbage collector. A trampoline adds a return and an indirect call for each step. Compilers that use CPS internally do not pay these costs, because they allocate most continuations on the stack or turn them into jumps. The memory of a CPS computation is the chain of continuations, which grows as the stack of the direct version would grow.

History

Continuations were found many times. Reynolds wrote: "In the early history of continuations, basic concepts were independently discovered an extraordinary number of times."2 Adriaan van Wijngaarden described the first CPS transform in September 1964, at an IFIP working conference in Baden bei Wien: to translate Algol 60 into a smaller language, he gave each procedure an extra parameter, a label, and ended its body with a jump to that label. Antoni Mazurkiewicz, Lockwood Morris, Christopher Wadsworth, James Morris, Michael Fischer and Kamal Abdali found related ideas between 1969 and 1973. Christopher Strachey and Wadsworth used continuations to give a denotational semantics for jumps, in a report of 1974.2

Gerald Jay Sussman and Guy L. Steele Jr. described Scheme in 1975 and used the name continuation-passing style. Steele's Rabbit compiler for Scheme, in 1978, converted programs to CPS as its intermediate form, and Andrew Appel's book Compiling with Continuations, in 1992, described the CPS compiler of Standard ML of New Jersey. Scheme added call-with-current-continuation to its standard reports. Node.js, from 2009, built its asynchronous API on error-first callbacks.3 Promises in ES2015 and async functions in ES2017, C# 5 and Python 3.5 then let programmers write direct-style code that compilers turn into continuations.

References

  1. Revised7 Report on the Algorithmic Language Scheme, 2013, section 6.10, Control features, call-with-current-continuation
  2. John C. Reynolds, The Discoveries of Continuations, LISP and Symbolic Computation 6, 233-247, 1993, abstract; sections 2 and 8
  3. Node.js documentation: JavaScript Asynchronous Programming and Callbacks, Callbacks; Handling errors in callbacks

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/6X37N0/text.yaml