rplaca, rplacd
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.
15.3.0 4rplaca replaces the car of the cons with object. and then returns the modified \param{cons}.
rplacd replaces the cdr of the cons with object. and then returns the modified \param{cons}.
(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.
None.
None.
None.
None.