Created
May 31, 2019 09:07
-
-
Save jasongorman/412eed39931147a47b45e46ae5b21c66 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
double total() { | |
double total = basket.stream() | |
.mapToDouble(i -> i.getPrice() * i.getQuantity()) | |
.sum(); | |
return total; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment