From 1b53607cd58bc952d6a6b3a7344292f68a6ba6af Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Tue, 27 Dec 2016 13:30:55 -0800 Subject: [PATCH] Edits to for re: continue Ref #122. --- examples/for/for.go | 5 +++-- examples/for/for.hash | 4 ++-- examples/for/for.sh | 2 -- public/for | 9 ++++----- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/examples/for/for.go b/examples/for/for.go index c9a12e6..1b1a2d7 100644 --- a/examples/for/for.go +++ b/examples/for/for.go @@ -27,8 +27,9 @@ func main() { break } - // You can also `continue` to the next loop - for n := 0; n <= 9; n++ { + // You can also `continue` to the next iteration of + // the loop. + for n := 0; n <= 5; n++ { if n%2 == 0 { continue } diff --git a/examples/for/for.hash b/examples/for/for.hash index bc4f565..b2dfc13 100644 --- a/examples/for/for.hash +++ b/examples/for/for.hash @@ -1,2 +1,2 @@ -0567bfd0e134cfd06f893c445dae72dd8d6064f6 -egSvQrHmW6 +33056d6b36f9894fb6359c9cf2ef8725bbdafa19 +KNLLSX4Io_ diff --git a/examples/for/for.sh b/examples/for/for.sh index 8395b92..12785eb 100644 --- a/examples/for/for.sh +++ b/examples/for/for.sh @@ -9,8 +9,6 @@ loop 1 3 5 -7 -9 # We'll see some other `for` forms later when we look at # `range` statements, channels, and other data diff --git a/public/for b/public/for index 3e885f8..ffffa5d 100644 --- a/public/for +++ b/public/for @@ -40,7 +40,7 @@ three basic types of for loops.

- +
package main
 
@@ -123,12 +123,13 @@ the enclosing function.

-

You can also continue to the next loop

+

You can also continue to the next iteration of +the loop.

-
    for n := 0; n <= 9; n++ {
+            
    for n := 0; n <= 5; n++ {
         if n%2 == 0 {
             continue
         }
@@ -161,8 +162,6 @@ the enclosing function.

1 3 5 -7 -9