Skip to content

Commit

Permalink
Correct inaccuracy in recursion description. (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwstephen authored Sep 23, 2024
1 parent 17b2ecf commit 78ecc3f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
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
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 78ecc3f

Please sign in to comment.