diff options
author | Matias Kinnunen <github@mtsknn.fi> | 2024-06-06 11:25:05 +0300 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-06-10 16:23:10 +0100 |
commit | 2f5ef9ea0e96b4d621152c0bc8efa8c994624c66 (patch) | |
tree | c516d1c1ea0e9432bb250ed0129c39a7a96a0075 /src | |
parent | a59534e26dff9c20d33e4d7d2068360297488bb8 (diff) | |
download | tour-2f5ef9ea0e96b4d621152c0bc8efa8c994624c66.tar.gz tour-2f5ef9ea0e96b4d621152c0bc8efa8c994624c66.zip |
Fix typo
Diffstat (limited to 'src')
-rw-r--r-- | src/content/chapter2_flow_control/lesson11_guards/code.gleam | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content/chapter2_flow_control/lesson11_guards/code.gleam b/src/content/chapter2_flow_control/lesson11_guards/code.gleam index 3744228..e655aef 100644 --- a/src/content/chapter2_flow_control/lesson11_guards/code.gleam +++ b/src/content/chapter2_flow_control/lesson11_guards/code.gleam @@ -6,8 +6,8 @@ pub fn main() { io.debug(get_first_larger(numbers, 5)) } -fn get_first_larger(lists: List(Int), limit: Int) -> Int { - case lists { +fn get_first_larger(numbers: List(Int), limit: Int) -> Int { + case numbers { [first, ..] if first > limit -> first [_, ..rest] -> get_first_larger(rest, limit) [] -> 0 |