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,13 @@
(defun transpose (matrix)
(transpose matrix '()))
(defun transpose (matrix acc)
(cond
((lists:any
(lambda (x) (== x '()))
matrix)
acc)
('true
(let ((heads (lists:map #'car/1 matrix))
(tails (lists:map #'cdr/1 matrix)))
(transpose tails (++ acc `(,heads)))))))

View file

@ -0,0 +1,8 @@
> (transpose '((1 2 3)
(4 5 6)
(7 8 9)
(10 11 12)
(13 14 15)
(16 17 18)))
((1 4 7 10 13 16) (2 5 8 11 14 17) (3 6 9 12 15 18))
>