aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter2_flow_control
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/chapter2_flow_control')
-rw-r--r--src/content/chapter2_flow_control/lesson05_recursion/code.gleam2
1 files changed, 1 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 ee93a6f..4b24db1 100644
--- a/src/content/chapter2_flow_control/lesson05_recursion/code.gleam
+++ b/src/content/chapter2_flow_control/lesson05_recursion/code.gleam
@@ -9,7 +9,7 @@ pub fn main() {
pub fn factorial(x: Int) -> Int {
case x {
// Base case
- 1 -> 1
+ 0 | 1 -> 1
// Recursive case
_ -> x * factorial(x - 1)