diff options
author | 0riginaln0 <74508026+0riginaln0@users.noreply.github.com> | 2024-04-14 07:43:53 +0300 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-04-15 13:10:48 +0100 |
commit | e997995154a65de39914e9d5b615e3f929df1c02 (patch) | |
tree | b2f880db8ffb0ddebf460ca7ad02a43feeef619c /src/content | |
parent | 589fca9fbab1825c21295afc5cdec9bf038fb48e (diff) | |
download | tour-e997995154a65de39914e9d5b615e3f929df1c02.tar.gz tour-e997995154a65de39914e9d5b615e3f929df1c02.zip |
separate case
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/chapter2_flow_control/lesson06_tail_calls/code.gleam | 3 |
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 |