chickadee » sequences » make-random-access-sequence

make-random-access-sequence MAKE ELT SIZEprocedure

Returns an object representing a sequence that allows random access to its elements. MAKE should be a procedure of two arguments, a size count and an initial value and should return a collection of elements which will be stored as "data" in the sequence object. ELT should be a procedure of two arguments receiving the "data" and an exact integer index and should return the element inside the data collection at the given position. SIZE should be a procedure that receives the data and returns the number of elements in that collection.

Note that the "data" may be anything - the operators fully define how it is interpreted.