Currying and partially applied functions