Skip to content

Commit 78ecc3f

Browse files
authored
Correct inaccuracy in recursion description. (#554)
1 parent 17b2ecf commit 78ecc3f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

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/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)