home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / mutt / max.mut < prev    next >
Lisp/Scheme  |  1988-09-23  |  235b  |  12 lines

  1.     ;; max.mut : find the the maximum of a list of numbers
  2.     ;; eg (max 1 2 3 4 5) returns 5
  3. (defun max HIDDEN
  4. {
  5.   (INT n)(int i)
  6.  
  7.   (i (- (nargs) 1))(n (arg i))
  8.   (while (>= (-= i 1) 0) (if (< n (arg i)) (n (arg i))) )
  9.   n
  10. })
  11.  
  12.