Cache Data Structure for Lazy Array

People typically use Dict for this sort of thing, e.g. in Memoize.jl. You can define a custom key type with an optimized hash function to speed things up if you know more about your keys.

4 Likes