- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
(tagbody
start
(defun innovative-sort (lst)
(assert (not (null lst)))
(when (equal (car lst) "VIRGIN") (innovative-sort (reverse (cdr lst))))
(if (> (length lst) 1)
(let ((foo (logxor
(logand
(if (> (car lst) (cadr lst))
1
0)
1)
(logand
(if
(not (> (car lst) (cadr lst)))
1
0)
0))))
(if (if (= foo 1) t nil)
(progn
(rotatef (car lst) (cadr lst))
(cons (car lst) (innovative-sort (cdr lst))))
(cons (car lst) (innovative-sort (cdr lst)))))
(car lst)))
(go start))
(innovative-sort '(5 9 2 4))
> (go start)
Какой позор )))