Compare length of two strings: Difference between revisions

m
Simplify Common Lisp
(Add Common Lisp)
m (Simplify Common Lisp)
Line 731:
<syntaxhighlight lang="lisp">
(defun sort-and-print-strings (strings)
(dolist (s (sort (copy-list strings) #'> :key #'length))
(lambda (s1 s2) (> (length s1) (length s2)))))
(format t "~A ~A~%" (length s) s)))
 
4

edits