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
### Keybase proof | |
I hereby claim: | |
* I am samantha-wong on github. | |
* I am shootingunicorns (https://keybase.io/shootingunicorns) on keybase. | |
* I have a public key ASClgvIQCeZBmv-97eV9XMeXjuHWKnUFWZSP9fliHFIbNQo | |
To claim this, I am signing this object: |
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
var str = "Hello, playground" | |
protocol Door { | |
var isLocked: Bool { get set } | |
func open() | |
func close() | |
} | |
struct SlidingDoor: Door { | |
var isLocked: Bool = false |
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
func doubler (number: Int) -> Int { | |
let doubledNumber = number * 2 | |
return doubledNumber | |
} | |
func makeMultiplierfunc(number: Int, multiplier:Int) -> Int { | |
let newNumber = number * multiplier |
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 UIKit | |
var str = "Hello, playground" | |
enum WeatherCondition { | |
case Sunny | |
case Cloudy(cloudType: String) | |
case Rain(inches: Float) |
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 UIKit | |
var str = "Hello, playground" | |
class Restaurant { | |
var name: String | |
init(name: String) { |
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
enum WeatherCondition { | |
case Sunny | |
case Cloudy(cloudType: String) | |
case Rain(inches: Float) | |
case Snow(inces: Float, packingSnow: Bool) | |
} | |
struct Weather { | |
var celsius: Double { |