Prequel: primitive recursion driven; general recursion powered.
Assignment, two control structures, and two datatypes. As simple as possible, but not simpler. Prequel is easy to follow.
n = factorial.input  result = 1 repeat n result *= n+1 endrep factorial.return(result)
The interpreter runs on JavaScript for a mobile-first approach.
[New (August 2025):] Embedded bytecode compiler in C.
Have a look at this Prequel primer and then get started with a range of examples that help illustrate the key features of Prequel.
Animate a line of 8 pixels; create visual effects with the available procedures.
Figure out the relation between the input and the expected result in this inductive programming game.
Write and test hypothesis using this Prequel programming laboratory.
Play code golf on average instructions executed.
Read a description of what to implement or deduce the algorithm.
Prototype ideas in this 2D-polygon game engine.
Note that programming programming games is also possible.
Looking for additional Prequel examples?
Develop a Prequel bot to control a team of amoebas.
Use the built-in debugger to test the code.
Try this programming game here.
Find the key and escape from the labirinth.
Get out of the labirinth here.
The traditional "Hello, World!" program written in Prequel would be:
print("Hello, World!")
For another classic first program example, try the Factorial here.
Prequel imposes a programming discipline that prohibits recursive calls and unbounded loops. The runtime system derives its Turing completeness from re-entering a module whenever the execution slips past its last instruction.
This scholastic example shows a Prequel implementation of the Ackermann-Péter function. The Ackermann function is one of the earliest-discovered total computable functions that is not primitive recursive.
Try the Ackermann example here.
When all that is needed is a Prequel executable, use this tool to reduce a Prequel program to its essence.
If you already know other imperative programming languages, this Prequel primer should be enough to get started.
Here are the slides from a talk on Prequel, providing some context and the theoretical underpinnings of this programming language.
Here is a Backus-Naur form formally describing the syntax of a Prequel program.
An old parser and interpreter for Prequel is available on GitHub.
[New (August 2025):] Embedded bytecode compiler in C: prequellang.h and prequellang.c
Integration example: prequeltest.zip
Prequel stands for Primitive RECursive driven programming Language.
Prequel was created in 2017 by Hugo Simoes to provide his kids with the tools he wished to have had when starting to program.
Contact us at prequel@prequel-lang.org.
No spam please.
Happy Prequel programming!