summaryrefslogtreecommitdiff
path: root/1415/files/practicum/StdRoman.icl
diff options
context:
space:
mode:
authorCamil Staps2016-02-02 19:24:50 +0100
committerCamil Staps2016-02-02 19:24:50 +0100
commita7d7542dc646a5fd124ef71e71ce260889f1701b (patch)
tree04ed89503bbb3cc9933273a1326a53ca724c3492 /1415/files/practicum/StdRoman.icl
parentweek6 camil: working positioning of lines by putting empties at left and righ... (diff)
Moved to 1415 directoryHEADmaster
Diffstat (limited to '1415/files/practicum/StdRoman.icl')
-rw-r--r--1415/files/practicum/StdRoman.icl46
1 files changed, 46 insertions, 0 deletions
diff --git a/1415/files/practicum/StdRoman.icl b/1415/files/practicum/StdRoman.icl
new file mode 100644
index 0000000..fec4461
--- /dev/null
+++ b/1415/files/practicum/StdRoman.icl
@@ -0,0 +1,46 @@
+implementation module StdRoman
+
+import StdEnv, RomeinsGetal
+
+instance + Roman where ...
+instance - Roman where ...
+
+instance zero Roman where ...
+
+instance * Roman where ...
+
+instance / Roman where ...
+instance one Roman where ...
+
+
+instance ^ Roman where ...
+instance abs Roman where ...
+instance sign Roman where ...
+instance ~ Roman where ...
+
+instance == Roman where ...
+instance < Roman where ...
+instance isEven Roman where ...
+instance isOdd Roman where ...
+
+class toRoman a :: !a -> Roman
+instance toRoman Char where ...
+instance toRoman Int where ...
+instance toRoman Real where ...
+instance toRoman {#Char} where ...
+
+class fromRoman a :: !Roman -> a
+instance fromRoman Int where ...
+instance fromRoman Char where ...
+instance fromRoman Real where ...
+instance fromRoman {#Char}where ...
+
+instance rem Roman where ...
+instance gcd Roman where ...
+instance lcm Roman where ...
+
+Start :: (Roman,String,Int,Int)
+Start = (r,fromRoman r,toInt r,n)
+where
+ r = (toRoman 42) * (toRoman 101)
+ n = 42 * 101