Read lines from file, perform same arithmatic operation per-line. Sum results.
- How to read a file?
fs::read_to_string
-> split by newline -> parse to u32
- How to use iterators?
- Convert read file to
Vec
. Transform via maths. Sum result. Vec::iter::map
DoesVec.iter()
have its own type.
- Convert read file to
- Proper type conversions:
String
tou32