Skip to content

Instantly share code, notes, and snippets.

@ethereal-engineer
Created June 14, 2014 07:09
Show Gist options
  • Save ethereal-engineer/ba25702520e4db3dfc18 to your computer and use it in GitHub Desktop.
Save ethereal-engineer/ba25702520e4db3dfc18 to your computer and use it in GitHub Desktop.
Not Tony
// Playground - noun: a place where people can play
import Cocoa
var str = "Hello, playground"
operator infix ~ {}
@infix func ~ <T>(lhs: AnyObject, T) -> Bool {
if let output = lhs as? T {
return true
}
return false
}
let aBool = str ~ String.self
println(String.self)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment