3 ms·
Congratulations, you have found the most ugly Lisp code ever. > so I can't judge whether the author of this code actually knows what they're doing Not really.
by lispm 10y ago
Congratulations, you have found the most ugly Lisp code ever.
> so I can't judge whether the author of this code actually knows what they're doing
Not really. He can't even format the code.
For example from that blog post:
(defun return_highers_helper (list element result)
(cond
((null list) result)
((equalp (first element) (first (first list)))
(cond
((< (rest element) (rest(car list))) (return_highers_helper (cdr list) element (cons (car list) result)))
(t (return_highers_helper (cdr list) element result))
))
(t (return_highers_helper (cdr list) element result))
))
This would be written usually as:
(defun %return-highers (element list)
(remove-if-not (lambda (item)
(and (equalp (car element) (car item))
(< (cdr element) (cdr item))))
list))