Timeline for Define a recursive function within a function in Go
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 31, 2021 at 22:15 | comment | added | Brent Bradburn | TLDR: There is a simple solution -- declare the function before defining it. | |
| Dec 13, 2019 at 13:12 | comment | added | icza | @JamesK This has always been like that, see Getting method parameter names. Providing parameter names might still have documentation value. | |
| Dec 12, 2019 at 15:35 | comment | added | James K |
The parameter doesn't need to be named in the declaration so var Function2 func(int) int also works and avoids repeating oneself. Not sure when/if this changed.
|
|
| Oct 5, 2018 at 19:00 | history | edited | icza | CC BY-SA 4.0 |
added 865 characters in body
|
| Feb 14, 2018 at 19:53 | history | edited | icza | CC BY-SA 3.0 |
added 52 characters in body
|
| Jan 22, 2015 at 23:32 | vote | accept | Spearfisher | ||
| Jan 22, 2015 at 22:28 | history | edited | icza | CC BY-SA 3.0 |
added 102 characters in body
|
| Jan 22, 2015 at 22:13 | history | edited | icza | CC BY-SA 3.0 |
added 51 characters in body
|
| Jan 22, 2015 at 22:02 | history | answered | icza | CC BY-SA 3.0 |