[rucksack-devel] Error when deleting indexed objects

Brad Beveridge brad.beveridge at gmail.com
Tue Jan 22 16:59:35 UTC 2008


On 22/01/2008, Arthur Lemmens <alemmens at xs4all.nl> wrote:
> Brad Beveridge wrote:
>
> >     (rucksack-map-slot rs 'broken 'string-key
> >                      (lambda (obj)
> >                        (rucksack::rucksack-delete-object rs obj))
> >                      :equal "foo1")
>
> I forgot to mention that this way of deleting an object is a bad
> idea: you're traversing a data structure (the slot index) and
> modifying it (by deleting the object) at the same time.

You're right.  I guess I hadn't thought about that very hard, I'll
remember not to do that for "real" code :)

Brad



More information about the rucksack-devel mailing list