October 2018
Intermediate to advanced
370 pages
9h 15m
English
The dropLastWhile function accepts a lambda expression. This function keeps ignoring the elements from the end of the list until the condition is satisfied:
newList = numbers.dropLastWhile { it > 5 }println("Drop from end : while element is greater than 5")println(newList)
Read now
Unlock full access