Created
June 13, 2014 19:32
-
-
Save cieslak/5d43f37d5a437549d3cd to your computer and use it in GitHub Desktop.
Interrobang operator in Swift
This file contains 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
import Foundation | |
operator postfix ‽ {} | |
@postfix func ‽<T>(value: T?) -> T? { | |
return (arc4random_uniform(2) == 1) ? value : nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment