Created
June 7, 2018 14:39
-
-
Save fitomad/78e0e0dcb2ad39a826536af448f5690a to your computer and use it in GitHub Desktop.
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
import Foundation // Always import Foundation, no matter what you're developing | |
public struct Interview // Use structs, Apple loves structs, then me too. Why? Cause Apple love structs. | |
{ | |
// ¡Oh fortuna! ¿por qué eres tan esquiva conmigo? (Yes, spanish too) | |
private var result: Bool | |
/// Human readable result. | |
public var resultMessage: String | |
{ | |
return self.result ? "`da` one (⌐■_■)" : "not going to talk about that. ¬_¬" | |
} | |
/** | |
My interview at Apple | |
*/ | |
public init() | |
{ | |
self.result = Bool.random() // Yes, I paid attention at "What's new in Swift" WWDC 2018 session | |
} | |
} | |
// | |
// Tadaaaa! | |
// | |
let interview = Interview() | |
print("Hey [applicant name here]. What's about your job interview at Apple?") | |
print("Weel I'm \(interview.resultMessage)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment