Skip to content

Commit

Permalink
Correct inaccuracy in recursion description.
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben authored and wwwstephen committed Sep 23, 2024
1 parent 9f66cb2 commit b076b21
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion examples/enums/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/enums/enums.hash
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
097dc14a53f63735563f6f75314c30908aa46748
3zjUiM66KZe
ee42927ee1c864794570e23e8dadb2d20d64a4fd
prQMptP_p1s
1 change: 1 addition & 0 deletions examples/range-over-iterators/range-over-iterators.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
$ go run range-over-iterators.go
10
13
23
Expand Down
6 changes: 3 additions & 3 deletions examples/recursion/recursion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions examples/recursion/recursion.hash
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cdbd1a6957b3e2d7d9baa9efe4581ba4f8f3e753
MBTKk9VpAiK
5787b4a187dc208dcdae43c7fdc0ba19b821ed94
k4IRATLn9cE
6 changes: 3 additions & 3 deletions public/enums

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion public/range-over-iterators

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions public/recursion

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b076b21

Please sign in to comment.