Thank you and John for the very prompt responses! Am Mi., 7. Sept. 2022 um 16:22 Uhr schrieb Vladimir Nikishkin < lockyw...@gmail.com>:
> > Marc Nieper-Wißkirchen <marc.nie...@gmail.com> writes: > > >>** 5.3 An iterator for the empty list returns <code>#f</code> and an > iterator for the empty list. An iterator for a non-empty list returns the > head of the list and an iterator for its tail. > > >>So, the iterators for (#f, '()), and for '() return the same two values? > >>I am feeling an "off by one" error here. > > >I don't understand what you mean. There is no such thing as an > >iterator for the pair (#f, '()). > > Sorry, I didn't formulate it clearly. If a list only has a single > element, that is #f. This #f is its head, and rest is an empty list. > > Calling this iterator will produce ... an #f, and an iterator for an > empty list. > > On the other hand, an iterator for an actual empty list, which has no #f > as its head. Calling it will ... also produces an #f and an iterator for > an empty list. > Thanks! You are right; this iterator protocol is indeed not helpful when there are potentially #f values in the list. For the use case in SRFI 226, this doesn't matter. This specific iterator protocol stems from compatibility with Racket. A better protocol for more general sequences I have suggested on the mailing list for SRFI 228: https://srfi-email.schemers.org/srfi-228/msg/17514216/. I am going to add a remark about lists with #f in the SRFI 226 document. With my forthcoming loop SRFI (after this here is done), specific iterator/generator protocols hopefully become an implementation detail one does not have to worry about much because it is abstracted away. > > > >What would you suggest? > >"current-exception-handler-stack" or "current-exception-handler-list" or > just "exception-handler-stack"? > > I find "current-exception-handler-stack more aesthetically pleasing :). > After John's vote as well, I am going to use "exception-handler-stack". > >I am sorry again for the long time delay. > > As long as it is an excellent SRFI, it's worth waiting :). Thank you. > Thanks! All changes noted here pushed to my private repo. Marc