no spam in the repo
authorMart Lubbers <mart@martlubbers.net>
Sat, 12 Sep 2015 12:13:26 +0000 (14:13 +0200)
committerMart Lubbers <mart@martlubbers.net>
Sat, 12 Sep 2015 12:13:26 +0000 (14:13 +0200)
W/examples/StdEnv.wdef [deleted file]
W/examples/sample.w [deleted file]

diff --git a/W/examples/StdEnv.wdef b/W/examples/StdEnv.wdef
deleted file mode 100755 (executable)
index 8e1070d..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-># StdEnv.wdef\r
- #\r
- # builtin operator definitions\r
- #<\r
-\r
-prototype op prefix ~ a b : a -> b\r
-overload op prefix ~ N Z\r
-overload op prefix ~ Z Z\r
-overload op prefix ~ R R\r
-\r
-prototype op prefix ! a : a -> B\r
-\r
-prototype op infix AND a : a a -> a\r
-overload op infix AND N\r
-overload op infix AND Z\r
-\r
-prototype op infix OR a : a a -> a\r
-overload op infix OR N\r
-overload op infix OR Z\r
-\r
-prototype op infix XOR a : a a -> a\r
-overload op infix XOR N\r
-overload op infix XOR Z\r
-\r
-prototype op infix + a : a a -> a\r
-overload op infix + N\r
-overload op infix + Z\r
-overload op infix + R\r
-\r
-prototype op infix - a : a a -> a\r
-overload op infix - N\r
-overload op infix - Z\r
-overload op infix - R\r
-\r
-prototype op infix * a : a a -> a\r
-overload op infix * N\r
-overload op infix * Z\r
-overload op infix * R\r
-\r
-prototype op infix / a : a a -> a\r
-overload op infix / N\r
-overload op infix / Z\r
-overload op infix / R\r
-\r
-prototype op infix % a : a a -> a\r
-overload op infix % N\r
-overload op infix % Z\r
-\r
-prototype op infix > a : a a -> B\r
-overload op infix > N\r
-overload op infix > Z\r
-overload op infix > R\r
-\r
-prototype op infix < a : a a -> B\r
-overload op infix < N\r
-overload op infix < Z\r
-overload op infix < R\r
-\r
-prototype op infix == a : a a -> B\r
-overload op infix == B\r
-overload op infix == N\r
-overload op infix == Z\r
-overload op infix == R\r
-overload op infix == Char\r
-overload op infix == String\r
-\r
-prototype op infix != a : a a -> B\r
-overload op infix != B\r
-overload op infix != N\r
-overload op infix != Z\r
-overload op infix != R\r
-overload op infix != Char\r
-overload op infix != String\r
-\r
-op infix && : B B -> B\r
-op infix || : B B -> B\r
diff --git a/W/examples/sample.w b/W/examples/sample.w
deleted file mode 100755 (executable)
index 3e24184..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-># sample.w
- #
- # sneek preview for the world!
- #<
-
-import StdEnv
-
-typedef Tree a := Tip | Bin a (Tree a) (Tree a)
-
-# functions are invoked as 'insert(x, y)'
-func insert : a (Tree a) -> (Tree a)
-insert(x, Tip) = Bin x Tip Tip
-insert(x, Bin y l r) | x < y = Bin y insert(x, l) r
-                     | otherwise = Bin y l insert(x, r)
-
-# prefix operators work like normal functional functions
-op prefix contains : a (Tree a) -> B
-contains x Tip = False
-contains x (Bin y l r) | x == y = True
-                       | x < y = contains x l
-                                          | otherwise = contains x r
-
-op prefix len : [a] -> N
-len [] = 0
-len [_:xs] = 1 + (len xs)
-
-# currently no way to specify binding strenght
-op infix -- : N N -> B
--- x y | x < y = True
-       | otherwise = False
-
-func max : N N -> N
-max(x, y) | x -- y = y
-          | y -- x = x
-                 | otherwise = y # equals
-