diff --git a/examples/enums/enums.go b/examples/enums/enums.go index 6c516453c..c0cf90c42 100644 --- a/examples/enums/enums.go +++ b/examples/enums/enums.go @@ -17,7 +17,7 @@ type ServerState int // generates successive constant values automatically; in this // case 0, 1, 2 and so on. const ( - StateIdle = iota + StateIdle ServerState = iota StateConnected StateError StateRetrying diff --git a/examples/enums/enums.hash b/examples/enums/enums.hash index 311d55424..cc85b6a8e 100644 --- a/examples/enums/enums.hash +++ b/examples/enums/enums.hash @@ -1,2 +1,2 @@ -097dc14a53f63735563f6f75314c30908aa46748 -3zjUiM66KZe +ee42927ee1c864794570e23e8dadb2d20d64a4fd +prQMptP_p1s diff --git a/examples/range-over-iterators/range-over-iterators.sh b/examples/range-over-iterators/range-over-iterators.sh index 7fa2b5918..e717d5594 100644 --- a/examples/range-over-iterators/range-over-iterators.sh +++ b/examples/range-over-iterators/range-over-iterators.sh @@ -1,3 +1,4 @@ +$ go run range-over-iterators.go 10 13 23 diff --git a/examples/recursion/recursion.go b/examples/recursion/recursion.go index b85deb882..17d9c1dce 100644 --- a/examples/recursion/recursion.go +++ b/examples/recursion/recursion.go @@ -18,9 +18,9 @@ func fact(n int) int { func main() { fmt.Println(fact(7)) - // Closures can also be recursive, but this requires the - // closure to be declared with a typed `var` explicitly - // before it's defined. + // Anonymous functions can also be recursive, but this requires + // explicitly declaring a variable with `var` to store + // the function before it's defined. var fib func(n int) int fib = func(n int) int { diff --git a/examples/recursion/recursion.hash b/examples/recursion/recursion.hash index 7237c6a7b..832d7fc9b 100644 --- a/examples/recursion/recursion.hash +++ b/examples/recursion/recursion.hash @@ -1,2 +1,2 @@ -cdbd1a6957b3e2d7d9baa9efe4581ba4f8f3e753 -MBTKk9VpAiK +5787b4a187dc208dcdae43c7fdc0ba19b821ed94 +k4IRATLn9cE diff --git a/public/enums b/public/enums index 1b8f390ed..7eeee1a2e 100644 --- a/public/enums +++ b/public/enums @@ -49,7 +49,7 @@ are simple to implement using existing language idioms.
package main
const (
- StateIdle = iota
+ StateIdle ServerState = iota
StateConnected
StateError
StateRetrying
@@ -223,7 +223,7 @@ determine the next state…