Hacker News .hn
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
continuitylimit
on Sept 20, 2023
|
parent
|
context
|
favorite
| on:
Fixing for loops in Go 1.22
There is no “trick”. It’s the language spec! That go func can take arguments. Just add the argument for clarity. The “trick” here is saving the declaration in the go func’s signature. ‘go func(i0 int) { .... }(i)’
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: