Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
import Foundation typealias JSON = [String: Any] func parse(_ data: Data) -> JSON { return [:] } typealias Completion = (Result<Void, Error>) -> Void func save(completion: Completion) { completion(.success(())) } print(parse(Data()).isEmpty) save { res in switch res { case .success: print("saved") case .failure(_): print("error") } }