You have three coffee machines, and you want to calculate the total profit from these machines. Unfortunately, you have an old function (in the scope) that shows a profit for one machine, and you can't modify it:
def showProfit(amount: Int): String =
s"Your profit: $amount"
To show the total profit for all three machines, you can use implicit conversions to adapt the existing function for the tuple of machine profits. The following code must compile and show the total profit:
val amount1: Int = 200
val amount2: Int = 450
val amount3: Int = 100
showProfit((amount1, amount2, amount3)) // Your profit: 750