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
| func makeEscaping<Parameters,Result>(_ closure: (Parameters) -> Result) -> (Parameters) -> Result { | |
| func cast<From,To>(_ instance: From) -> To { | |
| return (instance as Any) as! To | |
| } | |
| return cast(closure) | |
| } | |
| // Example |
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
| { | |
| "name": "Fabric", | |
| "version": "1.3.0", | |
| "summary": "Fabric by Twitter, Inc.", | |
| "homepage": "https://fabric.io", | |
| "authors": "Twitter", | |
| "license": { | |
| "type": "Commercial", | |
| "text": "Fabric: Copyright 2015 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. OSS: http://get.fabric.io/terms/opensource.txt" | |
| }, |
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
| public func optionalMax <T: Comparable>(elements: T? ...) -> T? { | |
| var maximumElement: T? | |
| for element in elements { | |
| if let element = element { | |
| if let existingMaximumElement = maximumElement { | |
| if element > existingMaximumElement { | |
| maximumElement = element | |
| } | |
| } |
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
| #!/bin/sh | |
| modulesDirectory=$DERIVED_FILES_DIR/modules | |
| modulesMap=$modulesDirectory/module.modulemap | |
| modulesMapTemp=$modulesDirectory/module.modulemap.tmp | |
| mkdir -p "$modulesDirectory" | |
| cat > "$modulesMapTemp" << MAP | |
| module sqlite3 [system] { |
NewerOlder