![]() ![]() Therefore, we can fall filterIndexed() function on a List, or a Mutable List. The original list on which filterIndexed() function is called, remains unchanged. ![]() List.filterIndexed() function returns a List.Įlements of the List that return true for the given predicate, make it to the filtered List. ![]() Predicate is a lambda function that takes the index and element of the List as parameter and returns a boolean value. The syntax to call filterIndexed() function on a List with a predicate is List.filterIndexed(predicate) ![]()
0 Comments
Leave a Reply. |