Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created May 31, 2019 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/412eed39931147a47b45e46ae5b21c66 to your computer and use it in GitHub Desktop.
Save jasongorman/412eed39931147a47b45e46ae5b21c66 to your computer and use it in GitHub Desktop.
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