Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol Drinkable {
- associatedtype PrimaryIngredient: Ingredient
- associatedtype SecondaryIngredient: Ingredient
- var ingredients: [Any] { get set }
- mutating func fill()
- /**
- Provides the secondary ingredient
- - returns: The secondary ingredient
- */
- func provideMilk() -> SecondaryIngredient
- /**
- Provides the primary ingredient which will be mostly some sort of coffee
- - returns: The primary ingredient
- */
- func provideCoffee() -> PrimaryIngredient
- }
Add Comment
Please, Sign In to add comment