Adds snippet for memoized functions