Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,30 @@
(lib 'list) ;; for list-delete
(define dataM
'((the cat sat on the mat)
(the cat sat on the mat)
(A B C A B C A B C)
(A B C A B D A B E)
(A B)
(A B)
(A B B A)))
(define orderM
'((mat cat)
(cat mat)
(C A C A)
(E A D A)
(B)
(B A)
(B A)))
(define (order-disjoint M N)
(define R (append N null)) ;; tmp copy of N : delete w when used
(for/list [(w M)]
(if
(not (member w R)) w ;; output as is
(begin0
(first N) ;; replacer
(set! N (rest N))
(set! R (list-delete R w))))))