Hacker News new | ask | show | jobs
by est31 1302 days ago
Rust has a tool for that, it's iterators. It is only limited however.
1 comments

also `slice.get()` will return on option

and using a range check manually before an index will normally optimize the internal bounds check away