Subject: Re: Lazy sequence for reading file
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 19 Nov 2006 05:22:23 -0600
Newsgroups: comp.lang.lisp
Message-ID: <mJKdnRoMNcXyo_3YnZ2dnUVZ_oadnZ2d@speakeasy.net>
Christophe Rhodes  <csr21@cantab.net> wrote:
+---------------
| rpw3@rpw3.org (Rob Warnock) writes:
| > Sorry, SEQUENCE is the union of only *two* types: LIST & VECTOR.
| 
| This is not correct. Please look up the definition of the SEQUENCE
| type in the standard.
+---------------

Uh... I did, *really* I did!!  ;-}  ;-}

    http://www.lispworks.com/documentation/HyperSpec/Body/17_a.htm
    17.1 Sequence Concepts

    A sequence is an ordered collection of elements, implemented as
    either a vector or a list.
    ...

That sure sounded definitive to me!! My mistake was not remembering
that the standard is not always completely self-consistent. I *knew*
that, but forgot to browse around a bit to see if this was one of
those times. (Oops.) Looking further now, I see:

    http://www.lispworks.com/documentation/HyperSpec/Body/t_seq.htm
    System Class SEQUENCE
    ...
    The types VECTOR and the type LIST are disjoint subtypes of type
    SEQUENCE, but are not necessarily an exhaustive partition of sequence.
    ...

But to address the OP's original complaint about "a menagerie of
sequence types" [which my response was an attempt to rebut], do you
know of any implementation that actually exploits that permission?
E.g., do you know of any implementation that supports multi-dimensional
arrays as sequences? [I suppose one could always traverse such an
array in row-major order...]


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607