 		}
 		return indexes
 	}
-
+	
 	/// SwifterSwift: Remove all instances of an item from array.
 	///
 	/// - Parameter item: item to remove.
 	public mutating func removeAll(_ item: Element) {
 		self = self.filter { $0 != item }
 	}
-
+	
 	/// SwifterSwift: Remove all duplicates from array.
 	public mutating func removeDuplicates() {
-		var result: [Element] = []
-		for value in self {
-			if result.contains(value) == false {
-				result.append(value)
-			}
-		}
-		self = result
-	}
-
-}
+		// Thanks to https://github.com/sairamkotha for improving the method
+		self = reduce([]){ $0.contains($1) ? $0 : $0 + [$1] }
+	}
+	
+}


// MARK: - Properties
public extension Array {

	/// SwifterSwift: Random item from array.
	public var randomItem: Element {
		let index = Int(arc4random_uniform(UInt32(self.count)))
		return self[index]
	}

	/// SwifterSwift: Shuffled version of array.
	public var shuffled: [Element] {
		var arr = self

		}
		return nil
	}
	
	/// SwifterSwift: Remove last element from array and return it.
	///
	/// - Returns: last elemets in array (if applicable).
