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 Foundation | |
| public protocol AlmostEquatable { | |
| @warn_unused_result | |
| func ==~(lhs: Self, rhs: Self) -> Bool | |
| } | |
| public protocol EquatableWithinEpsilon: Strideable { | |
| static var Epsilon: Self.Stride { get } | |
| } |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| protocol DictionaryConvertable { | |
| static func fromDictionary(dictionary: [String: AnyObject]) throws -> Self | |
| func toDictionary() -> [String: AnyObject] | |
| } | |
| protocol DictionaryValueType { | |
| func dictionaryValue() -> AnyObject? | |
| } | |
| extension Optional: DictionaryValueType { | |
| func dictionaryValue() -> AnyObject? { |