Avatar
@swift-5.1.5 func factorial(of n: Int) -> Int { if n <= 1 { return 1 } else { return n * factorial(of: n - 1) } } print(factorial(of: 5))