Skip to content

Instantly share code, notes, and snippets.

@fojas
Created April 14, 2011 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fojas/918935 to your computer and use it in GitHub Desktop.
Save fojas/918935 to your computer and use it in GitHub Desktop.
my other confusing sort
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