Skip to content

Instantly share code, notes, and snippets.

@engin7
engin7 / reference-value-types.swift
Created October 27, 2022 20:17 — forked from ulusalomer/reference-value-types.swift
Reference Value Types Questions
import Foundation
// Question 1
struct Cat {
var age: Int
}
var cat = Cat(age: 5)
var fluffyCat = cat
fluffyCat.age = 3
import Foundation
import MapKit
final class MapKitService {
// Map the Apple Category to your own category
private let typesToDrink: [MKPointOfInterestCategory] = [.brewery, .cafe, .winery]
private let typesToEat: [MKPointOfInterestCategory] = [.foodMarket, .restaurant]
func retrieve(from: String, completionBlock: @escaping ([Place]) -> Void) {