curry function
curry, partial and memorized functions