 /* The MIT License (MIT)
  *
  * Copyright (c) 2014 Marc Ransome
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights

                randomElements.append(self[Int.random(selfRange)])
            }
        }
        
        return randomElements
    }
}

    static func random(max: Int) -> Int {
        return Int.random(0...max)
    }

    static func random(max: Int, count: Int) -> [Int] {
        var numbers = [Int]()
        for _ in 0..<count {
            numbers.append(Int.random(0...max))
        }
        return numbers
    }

    static func random(range: Range<Int>, count: Int) -> [Int] {
        var numbers = [Int]()
        for _ in 0..<count {
            numbers.append(Int.random(range))
        }
        return numbers
    }

    func to(max: Int, repeat: (index: Int) -> ()) {
        if (max > self) {
            for i in self...max {
