Skip to content

Instantly share code, notes, and snippets.

View wiiale's full-sized avatar
🐳

Li Li wiiale

🐳
View GitHub Profile
@wiiale
wiiale / EnumerationNestedTip.swift
Created July 26, 2019 07:53
Enumeration Nested Tip
import Foundation
struct Null {}
enum LikeError: Error {
case unknown
case liked
}
let likeResult: Result<Null, LikeError> = .failure(.liked)
//: A UIKit based Playground for presenting user interface
import UIKit
import PlaygroundSupport
enum SkyBehavior: String {
case clickSky = "clickSky"
case clickSun = "clickSun"
case clickSunspot = "clickSunspot"
}