In chapter 13 to demonstrate iterator pattern in action, author added Filter conformance to Sequence protocol.
However at the moment of its usage in method addAnnotations(), for in loop launched over array filter.businesses, not over filter (whose type supports iteration).
Now:
for business in filter.businesses {
guard let viewModel = annotationFactory.createBusinessMapViewModel(for: business) else {
continue
}
Expected:
for business in filter {
guard let viewModel = annotationFactory.createBusinessMapViewModel(for: business) else {
continue
}