different implementation of currying.