;
; ALTERNATIVE MIN/MAX USING LIST ARGUMENT
;
(DEFINE
  (MINL (LAMBDA (M L)
    (COND ((NULL L), M)
          ((< M (CAR L)), (MINL M (CDR L)))
          (T, (MINL (CAR L) (CDR L)))
    ))
  )
  (MINLIST (LAMBDA (L)
    (COND ((NULL L), NIL)
          ((ATOM L), L)
          (T, (MINL (CAR L) (CDR L)))
    ))
  )
  (MAXL (LAMBDA (M L)
    (COND ((NULL L), M)
          ((> M (CAR L)), (MINL M (CDR L)))
          (T, (MINL (CAR L) (CDR L)))
    ))
  )
  (MAXLIST (LAMBDA (L)
    (COND ((NULL L), NIL)
          ((ATOM L), L)
          (T, (MAXL (CAR L) (CDR L)))
    ))
  )
)
