summaryrefslogtreecommitdiff
path: root/examples/maybe.sin
diff options
context:
space:
mode:
Diffstat (limited to 'examples/maybe.sin')
-rw-r--r--examples/maybe.sin22
1 files changed, 0 insertions, 22 deletions
diff --git a/examples/maybe.sin b/examples/maybe.sin
deleted file mode 100644
index 91367cd..0000000
--- a/examples/maybe.sin
+++ /dev/null
@@ -1,22 +0,0 @@
-[type just_ [kind val]]
-[type none_ [kind]]
-
-[def just [val]
- [just_ 1 val]]
-
-[def just.val [x]
- [just_.val x]]
-
-[def none []
- [none_ 0]]
-
-[def has_value [x]
- [just_.kind x]]
-
-[def Maybe.>>= [a f]
- [if [has_value a]
- [f [just.val a]]
- a]]
-
-[def Maybe.return [x]
- [just x]]