Memoize function without cloning - #2 by red75prime
Most functional languages use garbage collection, so memory management is not a concern there. In Rust we need to do something explicitly.
Explaining why the borrow checker is complaining and how to deal with it.