|
@@ -16,3 +16,8 @@ mymaximum l = mymaximumof l 0
|
|
mymaximumof l x = case l of
|
|
mymaximumof l x = case l of
|
|
[] -> x
|
|
[] -> x
|
|
y:ys -> if y > x then mymaximumof ys y else mymaximumof ys x
|
|
y:ys -> if y > x then mymaximumof ys y else mymaximumof ys x
|
|
|
|
+
|
|
|
|
+-- Sort the list
|
|
|
|
+trimax l = if l == []
|
|
|
|
+ then []
|
|
|
|
+ else let y = mymaximum l in y:(trimax (mydelete l y))
|