Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/78e0e0dcb2ad39a826536af448f5690a to your computer and use it in GitHub Desktop.
Save fitomad/78e0e0dcb2ad39a826536af448f5690a to your computer and use it in GitHub Desktop.
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