From 483caabcb688e71eaadf9ee93fca52483a9ea06d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 4 Sep 2026 09:17:09 +0100 Subject: Reorder examples --- examples/03-sum/src/shapes.hob | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 examples/03-sum/src/shapes.hob (limited to 'examples/03-sum/src') diff --git a/examples/03-sum/src/shapes.hob b/examples/03-sum/src/shapes.hob new file mode 100644 index 0000000..03a727a --- /dev/null +++ b/examples/03-sum/src/shapes.hob @@ -0,0 +1,17 @@ +/// A 2D shape. +sum Shape { + variant Rectangle; + variant Triangle; + + field width: Int32; +} + +struct Rectangle { + field width: Int32; + field height: Int32; +} + +struct Triangle { + field width: Int32; + field height: Int32; +} -- cgit v1.2.3