Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created April 7, 2018 14:13
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 laevandus/beb3402e66430c01f3a31623d1112f4b to your computer and use it in GitHub Desktop.
Save laevandus/beb3402e66430c01f3a31623d1112f4b to your computer and use it in GitHub Desktop.
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