From a7d7542dc646a5fd124ef71e71ce260889f1701b Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 2 Feb 2016 19:24:50 +0100 Subject: Moved to 1415 directory --- fp1/week2/mart/VectorOverloading.icl | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 fp1/week2/mart/VectorOverloading.icl (limited to 'fp1/week2/mart/VectorOverloading.icl') diff --git a/fp1/week2/mart/VectorOverloading.icl b/fp1/week2/mart/VectorOverloading.icl deleted file mode 100644 index 74f6f69..0000000 --- a/fp1/week2/mart/VectorOverloading.icl +++ /dev/null @@ -1,22 +0,0 @@ -implementation module VectorOverloading - -import StdEnv - -:: Vector2 a = {x0 :: a, x1 :: a} - -instance == (Vector2 a) | == a where - == a b = a.x0 == b.x0 && a.x1 == b.x1 -instance zero (Vector2 a) | zero a where - zero = {x0=zero, x1=zero} -instance one (Vector2 a) | one a where - one = {x0=one, x1=one} -instance ~ (Vector2 a) | ~ a where - ~ a = {x0= ~a.x0, x1= ~a.x1} -instance + (Vector2 a) | + a where - + a b = {x0=a.x0+b.x0, x1=a.x1+b.x1} -instance - (Vector2 a) | - a where - - a b = {x0=a.x0-b.x0, x1=a.x1-b.x1} -instance * (Vector2 a) | * a where - * a b = {x0=a.x0*b.x0, x1=a.x1*b.x1} -instance / (Vector2 a) | / a where - / a b = {x0=a.x0/b.x0, x1=a.x1/b.x1} -- cgit v1.2.3