This file contains 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 | |
# [SwiftFormat Pass] | |
isCleanDiff() { | |
if git diff-index --quiet HEAD; then | |
return 0 | |
else | |
return 1 | |
fi |
This file contains 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
-- Exercise given data types | |
data OperatingSystem = GnuPlusLinux | |
| OpenBSDPlusNevermindJustBSDStill | |
| Mac | |
| Windows | |
deriving (Eq, Show, Enum) | |
data ProgrammingLanguage = Haskell | |
| Agda |
This file contains 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
//: Playground - noun: a place where people can play | |
import Cocoa | |
// Phantom Types Example | |
struct Validated {} | |
struct Unvalidated {} | |
struct Form<T> { |
This file contains 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 Food {} | |
protocol BrazilianFood: Food {} | |
protocol EnglishFood: Food {} | |
class EnglishPancake: EnglishFood {} | |
class BrazilianSoup: BrazilianFood {} | |
protocol Chef { | |
associatedtype FoodType: Food | |
This file contains 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 PresentationItem { } | |
protocol AnyPresenter { | |
func _present(item: Any) -> Void | |
} | |
protocol Presenter: AnyPresenter { | |
typealias PresentationType | |