data class WaffleSales(val type: String, val price: Int, val sat: Saturday, val sun: Sunday) val stroop = WaffleSales("stroop", price = 2, Saturday(15), Sunday(20)) val belgian = WaffleSales("belgian", price = 3, Saturday(25), Sunday(18)) val weekendSalesData = listOf(stroop, belgian) val dailySales = listOf( weekendSales.sumOf { it.price * it.sat.qtySold }, weekendSales.sumOf { it.price * it.sun.qtySold } ) println(dailySales) // [105, 94]