Next: Weak List Type, Previous: Hash Table Type, Up: Programming Types [Contents][Index]
A range table is a table that maps from ranges of integers to arbitrary Lisp objects. Range tables automatically combine overlapping ranges that map to the same Lisp object, and operations are provided for mapping over all of the ranges in a range table.
Range tables have a special read syntax beginning with ‘#s(range-table’ (this is an example of structure read syntax, which is also used for char tables and faces).
(setq x (make-range-table)) (put-range-table 20 50 'foo x) (put-range-table 100 200 "bar" x) x ⇒ #s(range-table data ((20 50) foo (100 200) "bar"))
See Range Tables, for information on how to create and work with range tables.