Open mirkov opened 2 years ago
Pairs are defined using defstruct
. While it is not very explicitly and clearly guaranteed in the standard, all conforming implementations should provide setf
able reader functions. That means this is done automatically. What you want is to use pair-left
instead of lt
.
(setf (rutil:pair-left (rutil:pair 0 1)) 1)
You could use car
or cadr
to get around possibly because your lisp implementation chooses to implement the struct as a list anyway.
However, your point remains valid. As rutils defines abbreviated operator names in abbr.lisp
as
(abbr lt pair-left)
(abbr rt pair-right)
it should transfer the setf
ability to the new names. To fix this issue, one has to support the macro definition of abbr
.
When executing
I get
I can use
car
andcadr
as workarounds.