summaryrefslogtreecommitdiff
path: root/fp1/week2/camil/TupleOverloading.dcl
diff options
context:
space:
mode:
authorMart Lubbers2015-04-16 21:22:20 +0200
committerMart Lubbers2015-04-16 21:22:20 +0200
commit6f604b19d3f5966e5c1d7c4fdf3703bd6ff0861c (patch)
tree96d580507249f7f58368476d9113007d4afcd748 /fp1/week2/camil/TupleOverloading.dcl
parentAdded student numbers (diff)
update to fp2 yay, public and licence
Diffstat (limited to 'fp1/week2/camil/TupleOverloading.dcl')
-rw-r--r--fp1/week2/camil/TupleOverloading.dcl25
1 files changed, 25 insertions, 0 deletions
diff --git a/fp1/week2/camil/TupleOverloading.dcl b/fp1/week2/camil/TupleOverloading.dcl
new file mode 100644
index 0000000..6831948
--- /dev/null
+++ b/fp1/week2/camil/TupleOverloading.dcl
@@ -0,0 +1,25 @@
+definition module TupleOverloading
+
+import StdEnv
+
+instance + (a,b) | + a & + b
+instance + (a,b,c) | + a & + b & + c
+
+
+instance - (a,b) | - a & - b
+instance - (a,b,c) | - a & - b & - c
+
+instance * (a,b) | * a & * b
+instance * (a,b,c) | * a & * b & * c
+
+instance / (a,b) | / a & / b
+instance / (a,b,c) | / a & / b & / c
+
+instance zero (a,b) | zero a & zero b
+instance zero (a,b,c) | zero a & zero b & zero c
+
+instance one (a,b) | one a & one b
+instance one (a,b,c) | one a & one b & one c
+
+instance ~ (a,b) | ~ a & ~ b
+instance ~ (a,b,c) | ~ a & ~ b & ~ c