summaryrefslogtreecommitdiff
path: root/files/practicum/SeqEnSeqList.icl
diff options
context:
space:
mode:
authorMart Lubbers2015-02-06 08:39:37 +0100
committerMart Lubbers2015-02-06 08:39:37 +0100
commit379b6353396ca2401241d714733d570629835ffe (patch)
tree26652c854a79c627b5f50bc8ac26f9b84f8e196d /files/practicum/SeqEnSeqList.icl
parentMerge branch 'master' of https://github.com/dopefishh/fp1 (diff)
added practicum files, updated gitignore
Diffstat (limited to 'files/practicum/SeqEnSeqList.icl')
-rw-r--r--files/practicum/SeqEnSeqList.icl16
1 files changed, 16 insertions, 0 deletions
diff --git a/files/practicum/SeqEnSeqList.icl b/files/practicum/SeqEnSeqList.icl
new file mode 100644
index 0000000..c303c57
--- /dev/null
+++ b/files/practicum/SeqEnSeqList.icl
@@ -0,0 +1,16 @@
+module SeqEnSeqList
+
+import StdEnv, StdStack
+
+Start = and
+ [ elements` s1 == elements s2
+ , elements` (popn` 3 s1) == elements (popn 3 s2)
+ , topn` 3 s1 == topn 3 s2
+ , elements` s1 == elements s2
+ ]
+where (s1,s2) = (pushes` [1..5] newStack, pushes [1..5] newStack)
+
+pushes` = // expressie met seq en push
+popn` = // expressie met seq en pop
+topn` n s = // expressie met seqList, top en pop
+elements` s = // expressie met seqList, top en pop