Created
February 6, 2021 16:01
-
-
Save mgryszko/3bad50d4fc71910628a06550fb6b21f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def total(croissants: Pricing, baguettes: Pricing, breadRolls: Pricing): BigDecimal = { | |
val initialTotal = BigDecimal(0) | |
val croissantsTotal = initialTotal + total(croissants) | |
val baguettesTotal = croissantsTotal + total(baguettes) | |
baguettesTotal + total(breadRolls) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment