diff options
Diffstat (limited to 'src/content/chapter2_flow_control/lesson05_recursion/code.gleam')
-rw-r--r-- | src/content/chapter2_flow_control/lesson05_recursion/code.gleam | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content/chapter2_flow_control/lesson05_recursion/code.gleam b/src/content/chapter2_flow_control/lesson05_recursion/code.gleam index 4b24db1..10d45ab 100644 --- a/src/content/chapter2_flow_control/lesson05_recursion/code.gleam +++ b/src/content/chapter2_flow_control/lesson05_recursion/code.gleam @@ -9,7 +9,8 @@ pub fn main() { pub fn factorial(x: Int) -> Int { case x { // Base case - 0 | 1 -> 1 + 0 -> 1 + 1 -> 1 // Recursive case _ -> x * factorial(x - 1) |