From 437d456cd504ca4124ef72ea4fb1576ec29563cd Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Sat, 9 Dec 2023 15:21:10 +0000 Subject: More on functions --- lessons/src/lesson014_higher_order_functions/code.gleam | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lessons/src/lesson014_higher_order_functions/code.gleam') diff --git a/lessons/src/lesson014_higher_order_functions/code.gleam b/lessons/src/lesson014_higher_order_functions/code.gleam index f453975..e3fb3e7 100644 --- a/lessons/src/lesson014_higher_order_functions/code.gleam +++ b/lessons/src/lesson014_higher_order_functions/code.gleam @@ -9,10 +9,10 @@ pub fn main() { io.debug(function(100)) } -fn twice(a: Int, function: fn(Int) -> Int) -> Int { - function(function(a)) +fn twice(argument: Int, function: fn(Int) -> Int) -> Int { + function(function(argument)) } -fn add_one(a: Int) -> Int { - a + 1 +fn add_one(argument: Int) -> Int { + argument + 1 } -- cgit v1.2.3