bolt/stdlib/math.bolt
2020-05-28 14:08:49 +02:00

12 lines
148 B
Text

import "./numbers.bolt";
// precedence a + b < a * b;
pub fn fac(n: I) -> I where I: int {
match n {
0 => 1,
i => i * fac(i-1),
}
}