simple and advanced curry, 2 protos of memoization