The fold would only work properly as long as none of the values are below zero (like unsigned integers). The initial value would probably just have be MIN instead.
Related Topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
First project review | 6 | 587 | April 1, 2023 | |
Rasteroid code review | 13 | 529 | January 23, 2023 | |
Learning Rust? Here's a book recommendation | 9 | 8444 | January 12, 2023 | |
Code review for a Rust beginner | 11 | 1441 | January 12, 2023 | |
Developing guidelines for prototyping with Rust | 8 | 1760 | November 26, 2019 |