This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: another nit.
dirk@ida.ing.tu-bs.de writes:
> that it is an error to pass a key that is not in the alist. Returning any
> other object is ambiguous. Even my suggestion to have an unique tag to be
> returned if the key is not found is ambiguous:
> You can simply use this
> tag to construct another alist, where it would be a valid return
This comes in handy in my situation. If tails of the alists are shared
and therefore read-only (as they are in my application), you can
"remove" a value from the alist by consing (KEY . #<unspecified> )
onto the list.
The problem is that #f is not ok as a tag for "does not contain the
key". (and #<unspecified> is)
--
Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu/~hanwen/