(access coll key) coll: any type key: any type returns any type
Retrieves an item from a collection.
collis an array or string,
keymust be an integer. Positive integers count forwards from the deque's first element, starting from
0, while negative integers count backwards from the deque's last element, starting from
collis a table,
keycan be any value. See
keys-eqv?for a discussion of how table keys are tested for equivalence.
collis an object or class,
keymust be a symbol. Fields, constants and properties are bound both to a fully-qualified name, like
State:x, and an unqualified name, like
? special syntax can be used to perform fallible indexing:
[coll (? key)]. In
that case, if the index
key is not present, the function succeeds and returns
coll is a deque, slicing syntax is supported:
[deq i : j], where either
j may be absent. This returns a newly-allocated, mutable deque which contains all
of the elements from
i inclusive to
j exclusive. Negative indexes are supported.
key is an iterator, this function returns a new iterator which produces
[coll item] for each item produced by