A.Vector.map

You're seeing just the function map, go back to A.Vector module for more information.

Specs

map(t(v1), (v1 -> v2)) :: t(v2) when v1: value(), v2: value()

Returns a new vector where each element is the result of invoking fun on each corresponding element of vector.

Runs in linear time.

Examples

iex> A.Vector.new(1..10) |> A.Vector.map(&(&1 * &1))
vec([1, 4, 9, 16, 25, 36, 49, 64, 81, 100])