1 ;; descriptive.lisp -- additional functions needed by package descriptive
3 (defun $unique_in_sorted_array
(a)
5 (cons '(mlist) (loop for x across a when
(not (alike1 prev
(setq prev x
))) collect x
))))
7 (defun $vector_min_max
(a)
9 (let ((min-a '$inf
) (max-a '$minf
) ($ratprint nil
))
11 do
(let ((cmp-min ($compare x min-a
))
12 (cmp-max ($compare x max-a
)))
13 (when (string= cmp-min
"<") (setq min-a x
))
14 (when (string= cmp-max
">") (setq max-a x
))))
15 (list '(mlist) min-a max-a
))))
16 ;; Otherwise return NIL if A is empty.