Previous: Method Generators, Up: Generic Dispatch [Contents][Index]
A dispatch tag is an object that represents the “type” of an object, for the purposes of generic dispatch. Every object has an associated dispatch tag. Built-in objects like pairs or booleans have predefined tags, while dynamically typed objects like records have tags that are created as needed.
Returns the dispatch tag for object.
(dispatch-tag #f) ⇒ #[dispatch-tag 17 (boolean)] (dispatch-tag #t) ⇒ #[dispatch-tag 17 (boolean)] (dispatch-tag (list)) ⇒ #[dispatch-tag 18 (null)] (dispatch-tag (list 3)) ⇒ #[dispatch-tag 19 (pair list)]
Returns the built-in dispatch tag called name. Name must be a symbol that is the name of a known built-in dispatch tag.
(built-in-dispatch-tag 'boolean) ⇒ #[dispatch-tag 17 (boolean)] (built-in-dispatch-tag 'null) ⇒ #[dispatch-tag 18 (null)] (built-in-dispatch-tag 'pair) ⇒ #[dispatch-tag 19 (pair list)] (built-in-dispatch-tag 'list) ⇒ #[dispatch-tag 19 (pair list)]
Returns a list of the built-in dispatch tags.
Returns the dispatch tag associate with record-type. See See Records, for more information about record types.
Returns ‘#t’ if object is a dispatch tag, and ‘#f’ otherwise.
Signals an error if object is not a dispatch tag. Caller is a symbol that is printed as part of the error message and is intended to be the name of the procedure where the error occurs.