guile-user
[Top][All Lists]
Advanced

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

Re: obscure problem


From: David Pirotte
Subject: Re: obscure problem
Date: Mon, 04 Jun 2001 02:18:37 +0200

thi wrote:
> 
> i believe `reverse' conses up a new list, leaving its input unchanged,
> whereas `reverse!' is not required to be so nice.
> 

yes, i knew this, but the call to 

        (define (db-utils/build-db-class-slots table-attrs)
          (let ((slots '(db-oid))
                (slot-defs '((db-oid #:accessor db-oid
                                     #:init-keyword #:db-oid
                                     #:init-value #f))))
             ...
             ))

is supposed to 'allocate a new list both for slots and slot-defs, at
every execution, no?

or maybe should I have defined tyhe let as is:

        (define (db-utils/build-db-class-slots table-attrs)
          (let ((slots (list 'db-oid))
                (slot-defs (list '(db-oid #:accessor db-oid
                                          #:init-keyword #:db-oid
                                          #:init-value #f))))
             ...
             ))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]