aboutsummaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
authorhuman154 <46430360+human154@users.noreply.github.com>2024-02-20 13:04:07 -0500
committerLouis Pilfold <louis@lpil.uk>2024-03-05 17:24:41 +0000
commitb9f46c17e6bfef99d30d22a53216b5d7397771cf (patch)
tree7e93d20048b6c5da1b651cd3023f10c4ba65f234 /src/content
parent7ae4df10d36323e913ab4ec6900746d191b33a15 (diff)
downloadtour-b9f46c17e6bfef99d30d22a53216b5d7397771cf.tar.gz
tour-b9f46c17e6bfef99d30d22a53216b5d7397771cf.zip
Added comment to drive home explanation of generic arguments
Diffstat (limited to 'src/content')
-rw-r--r--src/content/chapter1_functions/lesson06_generic_functions/code.gleam2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/content/chapter1_functions/lesson06_generic_functions/code.gleam b/src/content/chapter1_functions/lesson06_generic_functions/code.gleam
index e232bf8..2233c4c 100644
--- a/src/content/chapter1_functions/lesson06_generic_functions/code.gleam
+++ b/src/content/chapter1_functions/lesson06_generic_functions/code.gleam
@@ -14,6 +14,8 @@ pub fn main() {
io.debug(twice("Hello", exclaim))
}
+// The function signature (below) states that the type of
+// `value` must be the same in all 4 places:
fn twice(argument: value, function: fn(value) -> value) -> value {
function(function(argument))
}