aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorc2024-01-22 13:30:47 -0500
committerc2024-01-22 13:30:47 -0500
commit0ff1d40842390da36908c7ffce62f2cf33b173b9 (patch)
tree4536d78f68fe295b7b3dd1dee1609292b083ab18 /examples
parentd3ed2864afd3d470a39c7ef2ec1a53deaae18d14 (diff)
Not sure.
Diffstat (limited to 'examples')
-rw-r--r--examples/namespaces.halk11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/namespaces.halk b/examples/namespaces.halk
new file mode 100644
index 0000000..c8511be
--- /dev/null
+++ b/examples/namespaces.halk
@@ -0,0 +1,11 @@
+:nsp:people = {
+ ` Get a person's age at a specific year. `
+ :int:get_age.:nsp:person,:int:year = -.year, person:birthyear
+}
+
+:nsp:john = {
+ :int:birthyear = 2000;
+ :str:name = "John Doe";
+}
+
+print.people:get_age.john;