[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: safety

This page is part of the web mail archives of SRFI 1 from before July 7th, 2015. The new archives for SRFI 1 contain all messages, not just those from before July 7th, 2015.

Doug Currie writes:

 > I agree that a circular-list should not be considered a `list' for the
 > purpose of the specification of safety preconditions. But, if it is
 > considered a `pair' then I don't think the precondition for LAST-PAIR is
 > sufficient.

        Yikes -- you're right.  How about this?



        The argument is a list or an improper list.


Whether this is an improvement seems to depend on how you read the
definition of an improper list in R5RS:

# A chain of pairs not ending in the empty list is called an improper
# list.

Can a chain contain a cycle?  Maybe what we want to say is that the
argument to LAST-PAIR must be a non-cyclic chain of pairs.

======  John David Stone - Lecturer in Computer Science and Philosophy  =====
==============  Manager of the Mathematics Local-Area Network  ==============
==============  Grinnell College - Grinnell, Iowa 50112 - USA  ==============
==========  stone@xxxxxxxxxxxxx - http://www.math.grin.edu/~stone/  =========