Skip to content

Commit b076b21

Browse files
elibenwwwstephen
authored andcommitted
Correct inaccuracy in recursion description.
1 parent 9f66cb2 commit b076b21

File tree

8 files changed

+18
-16
lines changed

8 files changed

+18
-16
lines changed

examples/enums/enums.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type ServerState int
1717
// generates successive constant values automatically; in this
1818
// case 0, 1, 2 and so on.
1919
const (
20-
StateIdle = iota
20+
StateIdle ServerState = iota
2121
StateConnected
2222
StateError
2323
StateRetrying

examples/enums/enums.hash

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
097dc14a53f63735563f6f75314c30908aa46748
2-
3zjUiM66KZe
1+
ee42927ee1c864794570e23e8dadb2d20d64a4fd
2+
prQMptP_p1s

examples/range-over-iterators/range-over-iterators.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
$ go run range-over-iterators.go
12
10
23
13
34
23

examples/recursion/recursion.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ func fact(n int) int {
1818
func main() {
1919
fmt.Println(fact(7))
2020

21-
// Closures can also be recursive, but this requires the
22-
// closure to be declared with a typed `var` explicitly
23-
// before it's defined.
21+
// Anonymous functions can also be recursive, but this requires
22+
// explicitly declaring a variable with `var` to store
23+
// the function before it's defined.
2424
var fib func(n int) int
2525

2626
fib = func(n int) int {

examples/recursion/recursion.hash

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
cdbd1a6957b3e2d7d9baa9efe4581ba4f8f3e753
2-
MBTKk9VpAiK
1+
5787b4a187dc208dcdae43c7fdc0ba19b821ed94
2+
k4IRATLn9cE

public/enums

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/range-over-iterators

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/recursion

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)