Hello,
it seems that defstruct on a copy or set! operation doesn't let you
set the value of a field to an empty list. For instance, test the
following code:
(use defstruct)
(defstruct test a b)
(define t1 (make-test a: '(1 2 3) b: '(4 5 6)))
(define t2 (test-copy t1 a: '()))
On Mon, Aug 25, 2008 at 03:29:30PM -0300, Alonso Andres wrote:
> Hello,
>
> it seems that defstruct on a copy or set! operation doesn't let you
> set the value of a field to an empty list.
>
> Probably a fix for this would be iterating through the arguments list
> to know which keys weren't reall
On Mon, Aug 25, 2008 at 3:53 PM, Peter Bex <[EMAIL PROTECTED]> wrote:
>
> This was a silly mistake of mine (empty list is eq? to an empty list, but
> a list with anything in it creates a new unique cons cell, which is what
> that code should have done). Thanks for catching it! It's been
> fixed an
On Mon, Aug 25, 2008 at 05:04:50PM -0300, Alonso Andres wrote:
> Hi Peter, it works perfectly now, thanks!
>
> I'd also like to suggest changing the procedure -copy to
> copy-, since the former seems like we're dealing with a field
> called "copy" (because the convention of creating procedures lik
Peter Bex scripsit:
> Perhaps you (or someone else on the list?) can think of a better name
> that can be prefixed, to remove all confusion? Ideally it'd be something
> which has been done before in Scheme, or failing that, something people
> would have absolutely no preconceptions about.
"clone-
On Mon, Aug 25, 2008 at 5:14 PM, Peter Bex <[EMAIL PROTECTED]> wrote:
> Perhaps you (or someone else on the list?) can think of a better name
> that can be prefixed, to remove all confusion? Ideally it'd be something
> which has been done before in Scheme, or failing that, something people
> would
On Mon, Aug 25, 2008 at 04:31:42PM -0400, John Cowan wrote:
> Peter Bex scripsit:
>
> > Perhaps you (or someone else on the list?) can think of a better name
> > that can be prefixed, to remove all confusion? Ideally it'd be something
> > which has been done before in Scheme, or failing that, some
On Mon, 25 Aug 2008, Alan Post wrote:
On Mon, Aug 25, 2008 at 04:31:42PM -0400, John Cowan wrote:
Peter Bex scripsit:
Perhaps you (or someone else on the list?) can think of a better name
that can be prefixed, to remove all confusion? Ideally it'd be something
which has been done before in Sc
On Mon, Aug 25, 2008 at 05:49:14PM -0300, Alonso Andres wrote:
> On Mon, Aug 25, 2008 at 5:14 PM, Peter Bex <[EMAIL PROTECTED]> wrote:
>
> > Perhaps you (or someone else on the list?) can think of a better name
> > that can be prefixed, to remove all confusion? Ideally it'd be something
> > which