             repeat(value: v)
         }
     }
-    
-    func random(count: Int) -> T[] {
-        var randomElements = T[]()
+
+    func random(count: Int) -> [T] {
+        var randomElements = [T]()
         var selfRange = 0...(self.count - 1)
-        
+
         for _ in 0..<count {
             randomElements.append(self[Int.random(selfRange)])
         }
-        
+
         return randomElements
     }
-    
-    func random(count: Int, unique: Bool) -> T[] {
-        
-        var randomElements = T[]()
-        var remainingIndices = Int[]()
-        
+
+    func random(count: Int, unique: Bool) -> [T] {
+
+        var randomElements = [T]()
+        var remainingIndices = [Int]()
+
         var selfRange = 0..<self.endIndex
-        
+
         for i in selfRange {
             remainingIndices.append(i)
         }
-        
+
         if unique {
             for _ in 0..<count {
-                
+
                 if remainingIndices.count == 0 {
                     break
                 }
-                
+
                 let rangeOfIndices = 0..<remainingIndices.endIndex
                 let randomIndex = Int.random(rangeOfIndices)
                 let randomValue = remainingIndices[randomIndex]
-                
+
                 randomElements.append(self[randomValue])
                 remainingIndices.removeAtIndex(randomIndex)
             }

/* 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

    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 {
