Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2021 20:18
What would you like to do?
Lambdas expressions & Closure (capturing lambda) | High performance with idiomatic Kotlin
var priceBooks = 0.0
val prefixPriceDetails = "The current sum is "
books.forEach {
priceBooks += it.price
println("$prefixPriceDetails $priceBooks")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment