(defn snapshot
"Returns a snapshot of a core.memo-placed memoization cache. By snapshot
you can infer that what you get is only the cache contents at a
moment in time."
[memoized-fn]
(when-let [cache (::cache (meta memoized-fn))]
(into {}
(for [[k v] (.cache ^PluggableMemoization @cache)]
[(vec k) @v]))))