The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

supotuco (32) [Avatar] Offline
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 (23) [Avatar] Offline
Hi, you are correct. Thank you for finding this, I will fix this immediately smilie
Rihana Lee (1) [Avatar] Offline
TylorSwift (1) [Avatar] Offline
Thanks for informing