Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Matrix-transposition/ACL2/matrix-transposition.acl2
Normal file
17
Task/Matrix-transposition/ACL2/matrix-transposition.acl2
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(defun cons-each (xs xss)
|
||||
(if (or (endp xs) (endp xss))
|
||||
nil
|
||||
(cons (cons (first xs) (first xss))
|
||||
(cons-each (rest xs) (rest xss)))))
|
||||
|
||||
(defun list-each (xs)
|
||||
(if (endp xs)
|
||||
nil
|
||||
(cons (list (first xs))
|
||||
(list-each (rest xs)))))
|
||||
|
||||
(defun transpose-list (xss)
|
||||
(if (endp (rest xss))
|
||||
(list-each (first xss))
|
||||
(cons-each (first xss)
|
||||
(transpose-list (rest xss)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue