Return a copy of the list, having removed all members for which the function fun returns True.
removeIf? ( fun As Name, _ list As List ) As List
Removing empty sublists
Intent >removeIf(empty?, { {:a}, {:b}, {}, {:d} }) --> {{:a}, {:b}, {:d}}
Using a custom function
Intent >removeIf(integer?, {:a, :c, "b", :c, 1.1, 3, :c, 3, 2, 1}) --> {:a, :c, "b", :c, 1.1, :c}
In this example, only non-integers were returned using the following custom function.
Function integer?(item as Any) as Boolean integer? = (typeName(item) = :integer) End Function
Using a built-in system function with integer list elements
Intent >removeIf(:even?, {1, 2, 3, 4, 5, 6, 7, 8}) --> { 1, 3, 5, 7 }
Viewing Details: