Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

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: