diff --git a/examples/numerals/Binary.gf b/examples/numerals/Binary.gf new file mode 100644 index 000000000..f053b64ba --- /dev/null +++ b/examples/numerals/Binary.gf @@ -0,0 +1,10 @@ +abstract Binary = { + +cat Bin; + +fun End : Bin ; +fun Zero : Bin -> Bin ; +fun One : Bin -> Bin ; + + +} \ No newline at end of file diff --git a/examples/numerals/BinaryDigits.gf b/examples/numerals/BinaryDigits.gf new file mode 100644 index 000000000..3a30a993c --- /dev/null +++ b/examples/numerals/BinaryDigits.gf @@ -0,0 +1,11 @@ +concrete BinaryDigits of Binary = { + +flags startcat=Bin ; + +lincat Bin = { s : Str } ; + +lin End = { s = "" } ; +lin Zero b = { s = "0" ++ b.s } ; +lin One b = { s = "1" ++ b.s } ; + +} \ No newline at end of file