fixes typos and a missing reference.
[maxima.git] / share / descriptive / descriptive_util.lisp
blobf1137654e932ecb113fa7133a1887773387376d3
1 ;; descriptive.lisp -- additional functions needed by package descriptive
3 (defun $unique_in_sorted_array (a)
4 (let ((prev (gensym)))
5 (cons '(mlist) (loop for x across a when (not (alike1 prev (setq prev x))) collect x))))
7 (defun $vector_min_max (a)
8 (if (> (length a) 0)
9 (let ((min-a '$inf) (max-a '$minf))
10 (loop for x across a
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.