https://kotlinlang.org logo
#getting-started
Title
# getting-started
l

locke

02/01/2018, 3:41 PM
Hi all. I feel like in Kotlin there should be an idiomatic way to say "for each item in this collection, execute this method." I'm currently writing this as:
collection.forEach { item -> item.call() }
but I feel like there should be something similar to
collection.forEach{Item::call}
. My Googling has not helped me, anyone know how this works?