collections - Scala: List drop first n empty items -


i have list:

val arr = array("", "", "a", "b", "") 

i want apply method on arr, such output is:

array("a", "b", "") 

it's just

arr.dropwhile(_.isempty) 

Comments

Popular posts from this blog

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -