1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
BiFunction<List<Product>, UUID, Product> { t1, t2  ->
    val product : Product? = t1.firstOrNull { it.uuid == t2 }
    return if (product == null) Product(name = "") else product
} 

>

BiFunction<List<Product>, UUID, Product> { t1, t2 ->
    val product : Product? = t1.firstOrNull { it.uuid == t2 }
    return@BiFunction product ?: Product(name = "")
}

BiFunction<List<Product>, UUID, Product> { 
    t1, t2 -> t1.firstOrNull { it.uuid == t2 } ?: Product(name = "")
}