filter!

filter!(function, collection)

Update collection, removing elements for which function is false. For associative collections, the function is passed two arguments (key and value).

Examples

julia> foo = [1:5];

julia> function isOdd(x)
        x % 2 != 0
       end

julia> filter!(isOdd, foo);

julia> foo
3-element Array{Int64,1}:
 1
 3
 5

See Also

append!, delete!, deleteat!, empty!, endof, filter, filter!, gc, get!, getkey, haskey, insert!, isempty, keys, map, map!, merge, merge!, pop!, prepend!, push!, reduce, resize!, shift!, splice!, unshift!, values,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: