Skip to main content
Module

x/collections/mod.ts>Vector#map

Collection data structures that are not standard built-in objects in JavaScript. This includes a vector (double-ended queue), binary heap (priority queue), binary search tree, and a red black tree.
Very Popular
Latest
method Vector.prototype.map
import { Vector } from "https://deno.land/x/collections@0.12.1/mod.ts";

Creates a new vector from the results of executing the provided function for each value in the vector. Optionally, you can iterate a subset of the vector by providing an index range. The start and end represent the index of values in the vector. The end is exclusive meaning it will not be included. If the index value is negative, it will be subtracted from the end of the vector.

Parameters

callback: (
v: T,
k: number,
vector: Vector<T>,
) => U
optional
start: number
optional
end: number

Parameters

callback: (
v: T,
k: number,
vector: Vector<T>,
) => U
optional
thisArg: V
optional
start: number
optional
end: number