aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter2_flow_control/lesson11_guards/code.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/chapter2_flow_control/lesson11_guards/code.gleam')
-rw-r--r--src/content/chapter2_flow_control/lesson11_guards/code.gleam4
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