Added memoize function adapter.