This directory contains some examples written in Gypsum. A few simple examples to start with are:
- hello.gy - introductory "hello world" program.
- factorial.gy - computes factorials recursively and iteratively. Shows if- and while-expressions.
- pi.gy - approximates the value of pi. A more advanced math example.
- list.gy - creates a linked list and sums the integers in it. Shows how classes and objects are used.
To run an example (replace hello
):
bazel run examples:hello