【 在 kangjian (iwilllove) 的大作中提到: 】
: a.then(c)
: a.then(d)
: a.then(f)
: 能保证执行顺序是 c ->d ->f?
no. you may want this:
function tap(fn) {
return function(v) {
return fn(v), v; // adjust if you want more arguments or preserve context
};
}
a.then(tap(c)).then(tap(d)).then(tap(f));
--
修改:XeCycle FROM 183.195.251.*
FROM 183.195.251.*