Skip to content

Instantly share code, notes, and snippets.

View ColinEberhardt's full-sized avatar

Colin Eberhardt ColinEberhardt

View GitHub Profile
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.3
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
let array = ["P","Q","R","S","T","P","R","A","T","B","C","P","P","P","P","P","C","P","P","J"]
extension Array {
func unique<T: Equatable>() -> [T] {
return self.reduce([T](), combine: { (array, value) -> [T] in
var result = array
let valAsT = value as T
if (!contains(array, valAsT)) {
result.append(valAsT)
}