mini / maxi functions



> I'd guess that users would sometimes assume that lmax on a matrix gives
> the largest matrix entry. I suppose lmax and lmin could have optional
> arguments that control all this, but I think it's more useful to unify
> lmax with maxi. Plus, for matrices, we have the one and infinity norms
> already.
>
> Maybe something like (now that transpose is less spendy)
>
> (defmacro opapply (op l)
>   `(simplify (cons (list ,op) ,l)))
>
> (defun $lmax (x)
>   (cond ((or ($listp x) ($setp x)) (opapply '$max (margs x)))
>      (($matrixp x)
>       (opapply 'mlist (mapar #'(lambda (s) (opapply '$max s)) (transpose (mcx (margs x))))))
>      (t (merror "The argument to 'lmax' must be a list, set, or matrix."))))
>     
> (defun $lmin (x)
>   (cond ((or ($listp x) ($setp x)) (opapply '$min (margs x)))
>      (($matrixp x)
>       (opapply 'mlist (mapar #'(lambda (s) (opapply '$min s)) (transpose (mcx (margs x))))))
>      (t (merror "The argument to 'lmin' must be a list, set, or matrix."))))
>     
>
> --Barton
>   
(I think you mean mapcar)

I am not against these changes. Documentation should put things clear.

Once lmin and lmax are changed, I'll update the descriptive file.

Thanks.

--
Mario