11 lines
287 B
Plaintext
11 lines
287 B
Plaintext
fn min {
|
|
"Returns the number in its arguments that is closest to negative infinity."
|
|
(x as :number) -> x
|
|
(x as :number, y as :number) -> if base :lt? (x, y) then x else y
|
|
(x, y, ...zs) -> (min, zs, min (x, y))
|
|
}
|
|
|
|
fn lt? (x as :number, y as :number) -> base :lt? (x, y)
|
|
|
|
#{min, lt?}
|