Service composition is the technique of creating new services by combining several existing services. Composite services can be also combined with other composite services to form nested or hierarchical services. Given that service composition depends on the interoperability created by using common network protocols and invocation interfaces, a composite service can have an impractically large number of variations depending of the number of available services and the composite's structure. It is hard to enumerate and maintain all variations possible. To solve this problem, we introduce a higher-order function that can take functions as parameters to allow function invocation. In concrete terms, we propose the following methods: (1) a hierarchical service composition description by introducing higher-order functions and (2) a method to implement (1) in an existing composite service execution system. As a test, we apply the proposals to Language Grid, and evaluate the results. They show that our methods can reduce the number of variations that need to be registered and managed even though their overheads are quite practical.