aboutsummaryrefslogtreecommitdiff
path: root/lessons/src/lesson014_higher_order_functions/code.gleam
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2023-12-09 15:21:10 +0000
committerLouis Pilfold <louis@lpil.uk>2023-12-09 15:21:10 +0000
commit437d456cd504ca4124ef72ea4fb1576ec29563cd (patch)
tree5c21e132658aa98276024e6c6eb3801d74b89078 /lessons/src/lesson014_higher_order_functions/code.gleam
parentc093b83c9c5ad3ba92e9153569be6e27476403ea (diff)
downloadtour-437d456cd504ca4124ef72ea4fb1576ec29563cd.tar.gz
tour-437d456cd504ca4124ef72ea4fb1576ec29563cd.zip
More on functions
Diffstat (limited to 'lessons/src/lesson014_higher_order_functions/code.gleam')
-rw-r--r--lessons/src/lesson014_higher_order_functions/code.gleam8
1 files changed, 4 insertions, 4 deletions
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
}