Skip to content

Instantly share code, notes, and snippets.

@Raiden18
Last active May 10, 2022 12:20
Show Gist options
  • Save Raiden18/97a676b03ed9847f4629e75622a2eda5 to your computer and use it in GitHub Desktop.
Save Raiden18/97a676b03ed9847f4629e75622a2eda5 to your computer and use it in GitHub Desktop.
Information Expert. Cart with method.
data class Cart(
val products: List<Product>
) {
val productsApproximatePrice : BigDecimal
get() = products.sumOf { it.price }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment