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

setf subseq question



    Date: Fri, 8 Jan 88 00:03 EST
    From: Brad Miller <miller@acorn.cs.rochester.edu>

    so what should (setf (subseq "abcdef" 3 5) "z")
    do?

I vote that it is some kind of error (I'm not sure whether it should be
"is an" or "signals an").  The point of SETF is that after doing

	(progn (setf <form> <val>)
	       <form>)

should return <val> (assuming that <form> doesn't have side-effects that
alter its return value).  If the result were "abcz" then (subseq
<result> 3 5) is an error.  If the result were "abczef" (which is what
Symbolics returns) then (subseq <result> 3 5) returns "ze", which isn't
the same as "z".

                                                barmar