rplaca, rplacd | Function |
rplaca cons object | → cons |
rplacd cons object | → cons |
rplaca: [ rē plakϵ ] or [ rϵ plakϵ ]
rplacd: [ rē plakdϵ ] or [ rϵ plakdϵ ] or [ rē plakdē ] or [ rϵ plakdē ]
cons — a cons.
object — an object.
(defparameter *some-list* (list* 'one 'two 'three 'four)) → *some-list* *some-list* → (ONE TWO THREE . FOUR) (rplaca *some-list* 'uno) → (UNO TWO THREE . FOUR) *some-list* → (UNO TWO THREE . FOUR) (rplacd (last *some-list*) (list 'IV)) → (THREE IV) *some-list* → (UNO TWO THREE IV)
The cons is modified.
Should signal an error of type type-error if cons is not a cons.