Slexy.org is shutting down and stopped accepting new Pastes on May 4th, 2021.
Existing Pastes will stop being available on or after May 10th, 2021.
Author: Not specified Language: lua
Description: Not specified Timestamp: 2018-03-20 14:51:24 +0000
View raw paste Reply
  1. function shufflei(a)
  2.   assert(type(a) == 'table', 'can only shuffle tables')
  3.   for i = 1, #a do
  4.     local s = math.random(i, #a)
  5.     a[i],a[s] = a[s],a[i]
  6.   end
  7.   return a
  8. end
  9.  
View raw paste Reply