aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content/chapter2_flow_control/lesson06_tail_calls/code.gleam3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content/chapter2_flow_control/lesson06_tail_calls/code.gleam b/src/content/chapter2_flow_control/lesson06_tail_calls/code.gleam
index 004793b..b0a416c 100644
--- a/src/content/chapter2_flow_control/lesson06_tail_calls/code.gleam
+++ b/src/content/chapter2_flow_control/lesson06_tail_calls/code.gleam
@@ -12,7 +12,8 @@ pub fn factorial(x: Int) -> Int {
fn factorial_loop(x: Int, accumulator: Int) -> Int {
case x {
- 0 | 1 -> accumulator
+ 0 -> accumulator
+ 1 -> accumulator
// The last thing this function does is call itself
// In the previous lesson the last thing it did was multiply two ints