下面代码中的谓词将始终返回 false。我的问题是如何“等待”异步操作并将该结果用作谓词结果?
return someList.createFiltered(function(item) {
var filter = false;
var promise = someOperationAsync();
promise.done(function(b) {
filter = b;
});
return filter;
});