diff options
author | Louis Pilfold <louis@lpil.uk> | 2024-03-07 11:01:43 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-03-07 11:01:48 +0000 |
commit | ac85cbf6ed82fbad2d0f65ed058a817113247631 (patch) | |
tree | 340551a48e9c6e886b3cb9716f2db2836accf7fb /src/content | |
parent | f791b2e6409a16f7436e8a603f44230bd7e33611 (diff) | |
download | tour-ac85cbf6ed82fbad2d0f65ed058a817113247631.tar.gz tour-ac85cbf6ed82fbad2d0f65ed058a817113247631.zip |
Apply @t3dotgg's suggestion
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/chapter1_functions/lesson03_higher_order_functions/code.gleam | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |