left_key

ABSTRACT

Left keys the given vector

REMARK

This function is similar to "enumerate" in many languages. It is useful when iterating over a collection and you need to know the index. In some cases, it may also be useful for tagging purposes.

PARAMETERS
vthe vector to left key
RETURN

a vector of the same length as the input, but each element x in the input vector is replaced by a vector of two elements, where the first element of the sub vector is the index of x, and the second element of the sub vector is x.

DECLARATION
func left_key(v)