Lukasz Kalnik
02/04/2022, 12:25 PMList<Int>
the dot is missing between the receiver type and the function name
• In the second extension function, fun List<Int>.firstOrZero()
using isNotEmpty()
the logic is the other way around (should be if (this.isNotEmpty()) this.first() else 0
)Alejandro Serrano Mena
02/04/2022, 12:44 PMLukasz Kalnik
02/04/2022, 12:46 PMAlejandro Serrano Mena
02/04/2022, 2:50 PMLukasz Kalnik
02/04/2022, 3:02 PMisEmpty()
has to be adjusted as well (2 lines above it still mentions isNotEmpty()
) 😉