Skip to content

Instantly share code, notes, and snippets.

@ketzusaka
Created August 5, 2015 16:52
Show Gist options
  • Select an option

  • Save ketzusaka/c2d1a392479ea8be88c0 to your computer and use it in GitHub Desktop.

Select an option

Save ketzusaka/c2d1a392479ea8be88c0 to your computer and use it in GitHub Desktop.
protocol Watable { }
func arrayTest<Type: Watable>(v: [Type]) {
if let unwrapped = v as? [Watable] {
print("Success!: \(unwrapped)")
} else {
print("Failed :(")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment