Created
April 14, 2011 05:23
-
-
Save fojas/918935 to your computer and use it in GitHub Desktop.
my other confusing sort
This file contains hidden or 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 wth_sort(k){ | |
for(var l,p=(l=k.slice()).shift(),m={},n=((m['true']=[])&&(m['false']=[]));l.length;)m[l[0]>p].push(l.shift()); | |
return (p&&arguments.callee(m[!1]).concat(p).concat(arguments.callee(m[!0])))||k; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment