Memoirization Functions for Rust