Hacker News new | past | comments | ask | show | jobs | submit login

"_" is when you must assign a value, but don't want to use it.

range in the for loop return 2 values (index, value). If you don't want the index, you can assign it to "_" to ignore it.

http://golang.org/ref/spec#Blank_identifier




oh! that's pretty cool.


Check your favorite language, it probably has this feature. Ruby, Haskell, tons of them.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: