Skip to content

Commit

Permalink
Merge pull request #11 from glhaynes/master
Browse files Browse the repository at this point in the history
  • Loading branch information
lorentey committed Nov 19, 2016
2 parents c66764c + 5adea3f commit 1394a26
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -28,7 +28,7 @@ class Book: Hashable, CustomStringConvertible {

init(title: String, authors: Set<Author>, publicationYear: Int, pages: Int) {
self.title = .init(title)
self.authors = SetVariable(authors)
self.authors = .init(authors)
self.publicationYear = .init(pages)
self.pages = .init(pages)
}
Expand Down Expand Up @@ -90,7 +90,7 @@ allAuthors.value
let booksByStephenson = shelves.flatMap{$0.books}.filter { book in book.authors.observableContains(stephenson) }
booksByStephenson.value

// Let's imagine Stephenson was a co-author of The TeXBook, and it him to its author list.
// Let's imagine Stephenson was a co-author of The TeXBook, and add him to its author list.
texBook.authors.insert(stephenson)

// `booksByStephenson` automatically updates to reflect the change.
Expand Down

0 comments on commit 1394a26

Please sign in to comment.