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
import Cocoa | |
/* | |
CoffeeScript funfact: I have 2 values `a` and `b`, and wanted a 3rd value `x` that is equal to `a` if it exists, otherwise is `b` if it exists, or is `undefined` if both are | |
sami [18:27] | |
I was able to do that with just `x = a ? b` | |
*/ | |
infix operator ?| {} | |
func ?| <T>(left: T?, right: T?) -> T? { |