This is the mail archive of the guile@cygnus.com mailing list for the guile project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Mikael Djurfeldt writes:
>
> Well, if you have a `slot-set!', I guess you have a `slot-ref' as
> well.
So is it.
>
> Then you can write:
>
> (if (not (defined? 'old-slot-ref))
> (define old-slot-ref slot-ref))
>
> (define slot-ref (make-procedure-with-setter old-slot-ref slot-ref))
^^^^^^^^^^^^^^^^^^^^^^^^^^
So that's a new subr that will come with future guile releases?
>
> Now you can do:
>
> (set! (slot-ref obj slot) val)
>
> which, I suppose, is what you wanted to do.
>
Exactly. Thanks.
--
Klaus Schilling