Last active
May 10, 2022 12:20
-
-
Save Raiden18/97a676b03ed9847f4629e75622a2eda5 to your computer and use it in GitHub Desktop.
Information Expert. Cart with method.
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
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