Created
April 7, 2018 14:13
-
-
Save laevandus/beb3402e66430c01f3a31623d1112f4b 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 | |
import ReactiveSwift | |
final class Pantry { | |
let jams = MutableProperty([Jam(flavour: .apple)]) | |
func add(jam: Jam) { | |
jams.value.append(jam) | |
} | |
} | |
struct Jam { | |
enum Flavour: String { | |
case apple, orange | |
} | |
let flavour: Flavour | |
init(flavour: Flavour) { | |
self.flavour = flavour | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment