|
SketchyLISP Reference |
Copyright (C) 2007 Nils M Holm |
| <<[map-cdr] | [Index] | [member]>> |
Conformance: R5RS Scheme
Purpose: Find the maximum of a sequence of numbers.
Arguments:
A - number
B... - numbers
Implementation:
(define (max a . b)
(fold-left (lambda (a b)
(if (> a b) a b))
a b))
Example:
(max -25 5 25 0 -5) => 25
| <<[map-cdr] | [Index] | [member]>> |