Live data from Hacker News

Will It Shuffle?

news.ycombinator.com

1–3 of 3 posts

Will It Shuffle?

#1
The shuffle Javascript algorithm may be rewritten with functional programming, minimum overhead just as.

shuffle= (a)=>{var b=Math.floor,c=Math.random,d=a.length;while(--d>=0)((c)=>{var b=a[d];a[d]=a[c],a[c]=b})(b(c()*(d+1)));return a}