From 2b107e8e1188eb330fd3d2d6e77c05af890c6f66 Mon Sep 17 00:00:00 2001 From: Harold Anderson Date: Sun, 28 Jul 2024 09:02:44 -0700 Subject: [PATCH] chore: Update comments in 015_for.zig file --- exercises/015_for.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/015_for.zig b/exercises/015_for.zig index 0ee8e7d..9f203c8 100644 --- a/exercises/015_for.zig +++ b/exercises/015_for.zig @@ -5,6 +5,10 @@ // for (items) |item| { // // // Do something with item +// // item does not have to be declared. The type of item is determined by +// // the type of the element in the array. +// // item is a variable that is equal to the particular element of the array items +// // that the loop is currently on. // // } // @@ -23,9 +27,5 @@ pub fn main() void { std.debug.print("The End.\n", .{}); } -// Note that 'for' loops also work on things called "slices" +// Note that 'for' loops also work on things called "slices" and "iterators", // which we'll see later. -// -// Also note that 'for' loops have recently become more flexible -// and powerful (two years after this exercise was written). -// More about that in a moment.