Hi Julian, "Julian Graham" <[EMAIL PROTECTED]> writes:
> Great links -- I had no idea this was such a contentious topic! Actually, R5RS `list?' itself must be used with care since it's O(N). > Actually, though, what Olin Shivers says in the introduction to SRFI-1 > is that specific parts of SRFI-1 should work (and are documented to > work) on dotted and / or circular lists in addition to proper lists. Well, SRFI-1, under "Improper Lists", reads this: Most procedures are defined only on proper lists -- that is, finite, nil-terminated lists. The procedures that will also handle circular or dotted lists are specifically marked. > Coincidentally, I noticed last night that Guile's implementation of > some of these parts is a bit buggy in this regard -- `take', > `take-right', `drop', and `drop-right' don't work on dotted lists. Indeed, the examples of SRFI-1 for `take' and `drop' with dotted lists work fine, but those of `take-right' and `drop-right' don't. Something we should fix. The reason is that these two procedures use `scm_list_tail ()', which is apparently not supposed to work with dotted list. I've just opened a bug: https://savannah.gnu.org/bugs/index.php?23112 . Anyone is welcome to fix it! ;-) Thanks, Ludovic.
