Re: HAMT iterator

2020-10-11 Thread Bruno Haible
Marc Nieper-Wißkirchen wrote: > > - If someone creates a derivative of the HAMT, the iterator won't > > be affected, right? ("persistence") > > Yes. OK, that's one thing to document. > > So, what is the scenario where increasing the reference count will make > > a difference? > > If you h

Re: HAMT iterator

2020-10-11 Thread Marc Nieper-Wißkirchen
Am So., 11. Okt. 2020 um 14:04 Uhr schrieb Bruno Haible : > > Marc Nieper-Wißkirchen wrote: > > > > /* Return an independent copy of ITER that is initially in the same > > > >state. */ > > > > extern Hamt_iterator *hamt_iterator_copy (Hamt_iterator *iter); > > > > > > Then a copy function is n

Re: HAMT iterator

2020-10-11 Thread Marc Nieper-Wißkirchen
Am So., 11. Okt. 2020 um 14:14 Uhr schrieb Bruno Haible : [...] > > > > /* Return an independent copy of ITER that is initially in the same > > > >state. */ > > > > extern Hamt_iterator *hamt_iterator_copy (Hamt_iterator *iter); > > > > > > Then a copy function is not needed, because the use

Re: HAMT iterator

2020-10-11 Thread Bruno Haible
Marc Nieper-Wißkirchen wrote: > > > I am going to implement the following iterator API as well: > > > > > > /* An alternative interface to iterating through the entry of a hamt > > >that does not make use of a higher-order function like > > >hamt_do_while uses the opaque Hamt_iterator type.

Re: HAMT iterator

2020-10-11 Thread Bruno Haible
Marc Nieper-Wißkirchen wrote: > > > /* Return an independent copy of ITER that is initially in the same > > >state. */ > > > extern Hamt_iterator *hamt_iterator_copy (Hamt_iterator *iter); > > > > Then a copy function is not needed, because the user's program can do > > > > Hamt_iterator ite

Re: HAMT iterator

2020-10-11 Thread Marc Nieper-Wißkirchen
Am So., 11. Okt. 2020 um 13:02 Uhr schrieb Bruno Haible : > > Hi Marc, > > > I am going to implement the following iterator API as well: > > > > /* An alternative interface to iterating through the entry of a hamt > >that does not make use of a higher-order function like > >hamt_do_while us

Re: HAMT iterator

2020-10-11 Thread Bruno Haible
Hi Marc, > I am going to implement the following iterator API as well: > > /* An alternative interface to iterating through the entry of a hamt >that does not make use of a higher-order function like >hamt_do_while uses the opaque Hamt_iterator type. */ > typedef struct hamt_iterator Ham