From bca0bca69d02d08599b9ee347c84e36ec0a5cf52 Mon Sep 17 00:00:00 2001 From: Nahua Kang Date: Sun, 24 Jul 2022 22:57:05 +0200 Subject: Edit comment above a for loop by reference line --- exercises/047_methods.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exercises') diff --git a/exercises/047_methods.zig b/exercises/047_methods.zig index b967ab8..1796ede 100644 --- a/exercises/047_methods.zig +++ b/exercises/047_methods.zig @@ -80,7 +80,7 @@ pub fn main() void { while (aliens_alive > 0) { aliens_alive = 0; - // Loop through every alien... + // Loop through every alien by reference by specifying that the capture value is a pointer for (aliens) |*alien| { // *** Zap the Alien Here! *** -- cgit v1.2.3-ZIG From 62e0bc88d60bc5505173131f421ee66fb641fd4a Mon Sep 17 00:00:00 2001 From: Nahua Date: Sun, 31 Jul 2022 18:04:56 +0200 Subject: Update comment per feedback --- exercises/047_methods.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exercises') diff --git a/exercises/047_methods.zig b/exercises/047_methods.zig index 1796ede..aee4c16 100644 --- a/exercises/047_methods.zig +++ b/exercises/047_methods.zig @@ -80,7 +80,7 @@ pub fn main() void { while (aliens_alive > 0) { aliens_alive = 0; - // Loop through every alien by reference by specifying that the capture value is a pointer + // Loop through every alien by reference (* makes a pointer capture value) for (aliens) |*alien| { // *** Zap the Alien Here! *** -- cgit v1.2.3-ZIG