aboutsummaryrefslogtreecommitdiff
path: root/exercises/018_functions.zig
diff options
context:
space:
mode:
authorDave Gauer <ratfactor@gmail.com>2021-08-28 10:25:03 -0400
committerGitHub <noreply@github.com>2021-08-28 10:25:03 -0400
commit71fbe3a07b21d8b5fbd729e493f7b866fd4f6dd4 (patch)
treee906e5eb8b2c4f2d6205cafdfe054567666c652d /exercises/018_functions.zig
parenta7ba7306f68377801a417a833875284754239eb4 (diff)
downloadziglings-71fbe3a07b21d8b5fbd729e493f7b866fd4f6dd4.tar.gz
ziglings-71fbe3a07b21d8b5fbd729e493f7b866fd4f6dd4.tar.bz2
ziglings-71fbe3a07b21d8b5fbd729e493f7b866fd4f6dd4.tar.xz
ziglings-71fbe3a07b21d8b5fbd729e493f7b866fd4f6dd4.zip
Update 018_functions.zig
Diffstat (limited to 'exercises/018_functions.zig')
-rw-r--r--exercises/018_functions.zig9
1 files changed, 3 insertions, 6 deletions
diff --git a/exercises/018_functions.zig b/exercises/018_functions.zig
index d8be5a1..1f78438 100644
--- a/exercises/018_functions.zig
+++ b/exercises/018_functions.zig
@@ -1,18 +1,15 @@
//
-// Functions! We've already created lots of functions called "main()". Now let's
+// Functions! We've already created lots of functions called 'main()'. Now let's
// do something different:
//
// fn foo(n: u8) u8 {
// return n + 1;
// }
//
-// The foo() function above takes a number "n" and returns a number that is
+// The foo() function above takes a number 'n' and returns a number that is
// larger by one.
//
-// If your function doesn't take any parameters and doesn't return anything,
-// it would be defined like main():
-//
-// fn foo() void { }
+// Note the input parameter 'n' and return types are both u8.
//
const std = @import("std");