From be5690bf05707107bc6f02005af82399b0c1c655 Mon Sep 17 00:00:00 2001 From: seh Date: Mon, 18 Mar 2019 03:44:58 -0500 Subject: add work on modules example --- Modules/towns.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Modules/towns.m (limited to 'Modules/towns.m') diff --git a/Modules/towns.m b/Modules/towns.m new file mode 100644 index 0000000..b9eab0a --- /dev/null +++ b/Modules/towns.m @@ -0,0 +1,14 @@ +include "persons.m"; + +Towns: module { + init: fn(); + mktown: fn(): ref Town; + + persons: Persons; + + Town: adt { + pop: array of ref Persons->Person; + name: string; + stringify: fn(t: self ref Town): string; + }; +}; -- cgit v1.2.3