Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
icholy
11 months ago
|
parent
|
context
|
favorite
| on:
Go 1.22
You can, which makes me wonder why they added the range-over-int functionality when it could have been a function in the proposed iter package:
for x := range iter.N(10) { ... }
dgunay
10 months ago
[–]
Better yet, you can name it something like `iter.ZeroTo(10)` and it immediately clears up questions about whether it begins from 0 or 1.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: