_elem(t: text, i: int): text

If 0 <= i < _length(t), returns a byte string of length 1 consisting of byte i of the byte sequence t. Otherwise, returns the empty string.

_elem("foo", 0) == "f"
_elem("A nice long string.\n", 18) == "."

_elem(l: list, i: int): any

Returns the i-th value in the list l, or ERR if no such value exists. (The first value of a list has index 0.)

_elem(<1, 2, 3>, 3) == ERR
_elem(<"def", 4, 5, 6,>, 2) == 5
_elem(< <"michigan", "militia">, <"intra-pennsylvania", "rivalry">>, 1) == <"intra-pennsylvania", "rivalry">

_elem(b: binding, i: int): binding

Returns a binding consisting solely of the i-th <name, value> pair in the binding b, or ERR if no such pair exists. The first pair of a binding has index 0.

_elem([], 0) == ERR
_elem([ foo = 1, bar = 2, moxy = TRUE, msg = "gotta get a _ to you" ], 2) == [ moxy = TRUE ]

Kenneth C. Schalk <ken@xorian.net> / Primitive Functions / Vesta SDL Programmer's Reference