From ac85cbf6ed82fbad2d0f65ed058a817113247631 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 7 Mar 2024 11:01:43 +0000 Subject: Apply @t3dotgg's suggestion --- .../chapter1_functions/lesson03_higher_order_functions/code.gleam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/content/chapter1_functions') diff --git a/src/content/chapter1_functions/lesson03_higher_order_functions/code.gleam b/src/content/chapter1_functions/lesson03_higher_order_functions/code.gleam index e3fb3e7..4301ce5 100644 --- a/src/content/chapter1_functions/lesson03_higher_order_functions/code.gleam +++ b/src/content/chapter1_functions/lesson03_higher_order_functions/code.gleam @@ -9,8 +9,8 @@ pub fn main() { io.debug(function(100)) } -fn twice(argument: Int, function: fn(Int) -> Int) -> Int { - function(function(argument)) +fn twice(argument: Int, passed_function: fn(Int) -> Int) -> Int { + passed_function(passed_function(argument)) } fn add_one(argument: Int) -> Int { -- cgit v1.2.3