Created
January 31, 2016 09:19
-
-
Save rndme/ca9f13ad8a156e883782 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isSorted(arr, fn){ | |
return !arr.some(function(a,b,c){ | |
if(!b) return; | |
return fn(a, c[b-1])!==1; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment