simple memoization macros for rust