[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Daniels.pa@XEROX.COM
- Subject: Out-of-range subsequences
- From: "Scott E. Fahlman" <Fahlman@C.CS.CMU.EDU>
- Date: Wed, 18 Jun 1986 02:15:00 -0000
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: Msg of 17 Jun 1986 17:43-EDT from Daniels.pa at Xerox.COM
- Sender: FAHLMAN@C.CS.CMU.EDU
Is it an error for a subsequence description to index elements that are
"off the end" of a sequence? By analogy with ELT, it should be, but I
have seen a couple of implementations that quietly take the intersection
of the intervals and go on from there? This would be true for SUBSEQ as
well as any sequence function that allows :START and :END keywords.
In particular, is (subseq #(1 2 3) 0 5) an error?
I don't see any clear statement in the book about this, but in my
opinion this should "be an error" and should probably be required to
signal an error.