summaryrefslogtreecommitdiff
path: root/week3/camil/StdSortList.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'week3/camil/StdSortList.dcl')
-rw-r--r--week3/camil/StdSortList.dcl18
1 files changed, 18 insertions, 0 deletions
diff --git a/week3/camil/StdSortList.dcl b/week3/camil/StdSortList.dcl
new file mode 100644
index 0000000..46bd238
--- /dev/null
+++ b/week3/camil/StdSortList.dcl
@@ -0,0 +1,18 @@
+definition module StdSortList
+
+import StdClass
+
+:: SortList a
+
+newSortList :: SortList a // lege gesorteerde lijst
+memberSort :: a (SortList a) -> Bool | Eq, Ord a // is element van
+insertSort :: a (SortList a) -> SortList a | Ord a // voeg element toe
+removeFirst :: a (SortList a) -> SortList a | Eq, Ord a // verwijder eerste voorkomen
+removeAll :: a (SortList a) -> SortList a | Eq, Ord a // verwijder alle voorkomens
+elements :: (SortList a) -> [a] // geef alle elementen
+count :: (SortList a) -> Int // aantal elementen
+
+minimum :: (SortList a) -> a // huidige minimum waarde
+maximum :: (SortList a) -> a // huidige maximum waarde
+
+mergeSortList :: (SortList a) (SortList a) -> SortList a | Eq, Ord a // meng gesorteerde lijsten