diff --git a/src/add/array.js b/src/add/array.js index 246eeb99..c0f4f775 100644 --- a/src/add/array.js +++ b/src/add/array.js @@ -22,7 +22,7 @@ if (!AP.flat) { }; } -AP.find = function(fn) { +AP.findWith = function(fn) { for (let i=0, l=this.length; i rec.type === 'flip'); + let fpos = oplist.findWith(rec => rec.type === 'flip'); if (fpos >= 0 && oplist.length > 1) { let oprec = oplist.splice(fpos,1); oplist.push(oprec[0]);