head-setter

Sets the head of a pair to contain an object and returns the object.  pair is modified by this operation.  Note that <list> is a subclass of <pair>.

define variable x = list (4, 5, 6)
head (x) := 9
⇒ 9
x
⇒ #(9, 5, 6)

Exported from

Arguments

objectAn instance of <object>.
pairAn instance of <pair>.

Values

objectAn instance of <object>.
The class of linked lists.
The class of lists that can have new values assigned to their heads and tails.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of all Dylan objects.