bug-guile
[Top][All Lists]
Advanced

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

Re: [bug #22022] hashx-set! and -ref


From: Neil Jerram
Subject: Re: [bug #22022] hashx-set! and -ref
Date: Thu, 17 Jan 2008 23:02:20 +0000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Gregory Marton <address@hidden> writes:

> Ack.  I think I meant to replace assoc as well, with something like
> (lambda (k alist) (cdar alist)).

That wouldn't be assoc-like.  (lambda (k al) (car al)) accesses the
correct level of alist structure, but would fault in the case where al
is empty.

So perhaps: (lambda (k al) (and (not (null? al)) (car al))).  With
this, the test passes - are you happy with that?

Thanks,
        Neil





reply via email to

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