supotuco (30) [Avatar] Offline
#1
Q: What are the number possible variations of Bagel?

enum Topping {
    case creamCheese
    case peanutButter
    case jam 
}

enum BagelType {
    case cinnamonRaisin
    case glutenFree
    case oatMeal
    case blueberry
}

struct Bagel {
    let topping: Topping
    let type: BagelType
}


The answer is 12 since structs are product types and 3 * 4 = 12.

Tjeerd in 't Veen (14) [Avatar] Offline
#2
Hi, you are correct. Thank you for finding this, I will fix this immediately smilie
Rihana Lee (1) [Avatar] Offline
#3
okkk
TylorSwift (1) [Avatar] Offline
#4
Thanks for informing