Created
June 14, 2014 07:09
-
-
Save ethereal-engineer/ba25702520e4db3dfc18 to your computer and use it in GitHub Desktop.
Not Tony
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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