zmunm
list.lastOrNull { it is Goods } as? Goods
inline fun <reified T> Collection<*>.findFirstInstance(): T? = firstOrNull { it is T } as? T inline fun <reified T> Collection<*>.findLastInstance(): T? = lastOrNull { it is T } as? T
Paul Woitaschek
A modern programming language that makes developers happier.