Rust pop-answer to finding values from percentages.
"of" is an overloaded term these days, but 'of' used to mean, simply, 'multiply by'.
./percs, updated: https://github.com/logicalgraphs/crypto-n-rust/blob/main/src/ch09/percs/percs.rs
What's striking here is the iter / zip / for_each interplay, directly calling the `whats`-function as a lambda.
types/percentage: https://github.com/logicalgraphs/crypto-n-rust/blob/main/src/libs/crypto/types/percentage.rs
`of` is implemented as a method on the Percentage-structure.
No comments:
Post a Comment