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

setf subseq question



This may already be cleared up (I don't have a copy of the definition
patchs, where can I get them?)

Pg. 248: subseq sez 

"
setf may be used with subseq to destructively replace a subsequence with a
sequence of new values; see also replace.
"

I ignore replace, because it says see also, as in another function that
does something along these lines, not see that for the definition of what
the setf does...

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

I would say (and vote for) "abcz" but if it acts like replace, you get
"abczef".

It would be real nice to have a (destructive) function that can replace
sequences with other sequences..., e.g. like substitute where new-item is
new-sequence.

Brad Miller
------
miller@cs.rochester.edu {...allegra!rochester!miller}
Brad Miller
University of Rochester Computer Science Department
'If anything is True, this is.'