[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Regularization of Procedures in Scheme (pair setters)



   Date: Thu, 27 Oct 88 18:55:52 EDT
   From: jinx@altdorf.ai.mit.edu (Guillermo J. Rozas)
   Reply-To: jinx@zurich.ai.mit.edu


       If you set a vector with VECTOR-SET! and a string with STRING-SET!,
       why do you set a pair with SET-CAR! and SET-CDR! instead of CAR-SET!
       and CDR-SET!.

   To be totally uniform it should be (PAIR-SET! <pair> <index> <value>) where
   index is 0 or 1, one of them meaning CAR, and the other meaning CDR. :-)

Or perhaps the index should be 'CAR or 'CDR:
	(PAIR-SET! foo 'CAR 43)     ;RPLACA       ;-]
--Guy