正如您在 Ramda REPL link here 中看到的那样,我希望从最终数组中删除m
。但它还在吗?
以下是 R.dropRepeats
上的文档const removeRepeats = tickers => {
console.log('removeRepeats',tickers);
let cleaned = R.dropRepeats(tickers);
console.log('cleaned',cleaned);
return R.dropRepeats(tickers);
};
let tickers = ['m', 'g', 'j', 'm'];
let final = removeRepeats(tickers);
console.log('final', final);