const greeting = (firstName, lastName) => firstName + ' ' + lastName
const toUpper = str => str.toUpperCase()
// 声明式编程(函数式)
function compose(funcs) {
return funcs.reduce((a, b) => (...args) => a(b(...args)))
}
const fn = compose([toUpper, greeting]);
const result = fn('jack', 'smith');
console.log(result);