map!(f,collection)

..  map!(function, collection)

In-place version of :func:`map`.

Examples

julia> foo = [1   2   3];
julia> map!((x) -> x^3, foo);
julia> foo
1x3 Array{Int64,2}:
 1      8       27

Passing destination as a param

julia> function F(x,y)
                x^2+y^2
            end
julia> bar = Array(Int64,1,3);
julia> map!(F,   bar,    [3    6   12],   [4   8   5])
1x3 Array{Int64,2}:
 25    100     169

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: