A Bit of Functional Programming in Rust
andreiformiga.com
andreiformiga.com
But that would generate a lot of "allocations" and "garbage." Possibly that approach only makes sense in a language with a garbage collector. Presumably, the main reason you would have chosen Rust in the first place is you desired tight control over memory. Yet, this "pure function" approach which creates a lot of garbage requires you to not care so much about tight control over memory.
As I said, this is a guess -- where am I right and where am I wrong?