In article <··········@news.tuwien.ac.at> ········@fbma.tuwien.ac.at (Clemens Heitzinger) writes:
--> Clint Hyde (·····@bbn.com) wrote:
-->
--> : duh. this is appalling simple, and I've never used reverse on strings. I
--> : wonder about the actual internal efficiency of nreverse and its mechanism.
-->
--> : -- clint
-->
--> In fact, reverse and similar procedures work on sequences (which include
--> lists and strings). nreverse is the destructive version of reverse and
--> good interpreters/compilers should do the work quite efficiently.
I hadn't ever thought about strings being sequences too--I never operate
on strings that way. substituting chars is about all... in fact, I
seldom do string-manipulation at all--the trickiest string stuff I've
done recently was in C, and even then it wasn't much. mostly it was
annoying, trying to figure out how to grab an integer from a
symbol-looking string ("ifInUcastPkts.3"), and then worrying about OTHER
strings containing integers summing and having 32-bit wraparound
("873465798"--try parse-integer and summing that a few times in C and
print the result: oops it's negative, how did THAT happen?)
-- clint