|
|
|
|
|
by tmtvl
11 days ago
|
|
The usual argument I've seen in favour of Lisp-2 (I personally don't care as much about the function namespace as I do about the type namespace, which I find much more important) is that you can name an argument a conflicting name with a function without the conflict interfering with the code you would write: (defun merge-sort (list before?)
(declare (type List list)
(type Function before?))
(flet ((merge-2 (a b)
(declare (type List a b)
(merge 'List a b before?)))
(unless (null list)
(reduce #'merge-2 list :key #'list))))
(merge-sort '(1 9 8 2 3 4 7 6 5)
#'<)
Instead of having to name lists 'lst' or something. Which is pretty much personal preference anyway. |
|