User Tools

A PCRE internal error occured. This might be caused by a faulty plugin

====== Function RPLACA, RPLACD ====== ====Syntax==== * **rplaca** //cons// //object// → //cons// * **rplacd** //cons// //object// → //cons// ====Arguments and values==== * //cons// - a //[[CL:Glossary:cons]]//. * //object// - an //[[CL:Glossary:object]]//. ====Description==== **rplaca** replaces the //[[CL:Glossary:car]]// of the //cons// with //object//. **rplacd** replaces the //[[CL:Glossary:cdr]]// of the //cons// with //object//. ====Examples==== <blockquote> ([[CL:Macros:defparameter]] *some-list* ([[CL:Functions:list-star|list*]] 'one 'two 'three 'four)) <r>*SOME-LIST*</r> *some-list* <r>(ONE TWO THREE . FOUR)</r> (rplaca *some-list* 'uno) <r>(UNO TWO THREE . FOUR)</r> *some-list* <r>(UNO TWO THREE . FOUR)</r> (rplacd ([[CL:Functions:last]] *some-list*) ([[CL:Functions:list]] 'IV)) <r>(THREE . IV)</r> *some-list* <r>(UNO TWO THREE . IV)</r> </blockquote> ====Side effects==== The //cons// is modified. ====Affected By==== None. ====Exceptional situations==== Should signal an error of //[[CL:Glossary:type]]// **[[CL:Errors:type-error]]** if //cons// is not a //[[CL:Types:cons]]//. ====Example Implementation==== To be done. ====Notes==== None.