or if you want the element itself `fun <T> L...
# getting-started
u
or if you want the element itself
fun <T> List<T>.firstDuplicate() = HashSet<T>().let { set -> firstOrNull { !set.add(it) } }
👍 2