rudus/assets/test_prelude.ld

11 lines
287 B
Plaintext
Raw Normal View History

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?}