Support multiple arguments in memoize