tidying up notation for generic memoizers