From b9f46c17e6bfef99d30d22a53216b5d7397771cf Mon Sep 17 00:00:00 2001 From: human154 <46430360+human154@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:04:07 -0500 Subject: Added comment to drive home explanation of generic arguments --- src/content/chapter1_functions/lesson06_generic_functions/code.gleam | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/content/chapter1_functions/lesson06_generic_functions/code.gleam') 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)) } -- cgit v1.2.3