summaryrefslogtreecommitdiff
path: root/files/practicum/VectorOverloading.icl
blob: ad11e4e7908eb023dc3cc00cc0d9c7cc7ba4dd39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
implementation module VectorOverloading

import StdEnv

:: Vector2 a = {x0 :: a, x1 :: a}

instance ==   (Vector2 a) | == a   where // maak instantie af
instance zero (Vector2 a) | zero a where // maak instantie af
instance one  (Vector2 a) | one a  where // maak instantie af
instance ~    (Vector2 a) | ~ a    where // maak instantie af
instance +    (Vector2 a) | + a    where // maak instantie af
instance -    (Vector2 a) | - a    where // maak instantie af
instance *    (Vector2 a) | * a    where // maak instantie af
instance /    (Vector2 a) | / a    where // maak instantie af