fork/numbat
git clone https://git.julia.blue/fork/numbat
b75bdb9
v1.6.3
1# Naive factorial implementation to showcase recursive 2# functions and conditionals. 3 4fn factorial(n: Scalar) -> Scalar = 5 if n < 1 6 then 1 7 else n × factorial(n - 1) 8 9# Compare result with the builtin factorial operator 10assert_eq(factorial(10), 10!)