Skip to content

Instantly share code, notes, and snippets.

@JacksonGariety
Created January 8, 2014 00:34
Show Gist options
  • Save JacksonGariety/8309551 to your computer and use it in GitHub Desktop.
Save JacksonGariety/8309551 to your computer and use it in GitHub Desktop.
function s(a,l){l='length';if(a[l]<2)return a;var s='slice',b=~~a[l]/2,c=s(a[s](0,b)),d=s(a[s](b)),e=[],f=0,g=0;while(f<c[l]&&g<d[l])c[f]<d[g]?e.push(c[f++]):e.push(d[g++]);return e.concat(c[s](f)).concat(d[s](g))}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment