function not(f){ return function(...args){ // console.log('print:this:',this); let result=f.apply(this,args); return !result; } } const even=x=>x%2===0; const odd=not(even); console.log('print:',[1,1,3,5,5].every(odd));