Files
compiler-explorer/examples/hylo/default.hylo
2023-10-11 15:01:45 -04:00

8 lines
143 B
Plaintext

public fun factorial(_ n: Int) -> Int {
if n < 2 { 1 } else { n * factorial(n - 1) }
}
public fun main() -> Int32 {
Int32(factorial(5))
}