A collection of example programs in Pre-Scheme
Andrew Whatson 8ed1788b54 Tidy up prime-sum demo | 1 month ago | |
---|---|---|
include | 1 month ago | |
lib | 1 month ago | |
.dir-locals.el | 1 year ago | |
.envrc | 1 year ago | |
.gitignore | 1 month ago | |
COPYING | 1 year ago | |
Makefile | 1 month ago | |
README.org | 1 month ago | |
append.c | 1 month ago | |
append.scm | 1 year ago | |
btree.c | 1 month ago | |
btree.scm | 1 year ago | |
game-of-life.c | 1 month ago | |
game-of-life.scm | 1 month ago | |
hello.c | 1 month ago | |
hello.scm | 1 year ago | |
manifest.scm | 1 month ago | |
packages.scm | 1 month ago | |
prime-sum.c | 1 month ago | |
prime-sum.scm | 1 month ago | |
recfun.c | 1 month ago | |
recfun.scm | 1 year ago | |
vecfun.c | 1 month ago | |
vecfun.scm | 8 months ago |
This repository contains some basic examples of Pre-Scheme code, and a simple Makefile for compiling these into native executables.
These examples are based on the one provided in "The Nearly Complete Scheme48 PreScheme Reference Manual" by Taylor Campbell: https://groups.scheme.org/prescheme/1.3/
The generated C for each of the demo programs is also included, so you can review the code generation without needing to build anything.
The Guix manifest sets up all prerequisites for building the demos, and compilation is handled by the Makefile.
To build the demos yourself:
git clone https://codeberg.org/prescheme/prescheme-demo.git
cd prescheme-demo
guix shell -m manifest.scm
make
This code is licensed under BSD-3-Clause, the same as Scheme 48 and the Pre-Scheme compiler. See COPYING for details.