Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 515 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 515 Bytes

Gypsum examples

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