Skip to content

Instantly share code, notes, and snippets.

@langford
Last active August 29, 2015 14:02
Show Gist options
  • Save langford/8284ed5ef5d3cfc9fa5c to your computer and use it in GitHub Desktop.
Save langford/8284ed5ef5d3cfc9fa5c to your computer and use it in GitHub Desktop.
Naive Infix Array Combiner Operator for Swift
func + <T> (left: T[], right: T[]) -> T[] {
var newArray : T[] = []
for item in left {
newArray.append(item)
}
for item in right {
newArray.append(item)
}
return newArray;
}
@langford
Copy link
Author

langford commented Jun 7, 2014

Tell be better ways at @MisterMichael on twitter!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment