Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!um-math!sharkey!cfctech!teemc!hpftc!zardoz!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!usc!cs.utexas.edu!farquhar
From: farquhar@cs.utexas.edu (Adam Farquhar)
Newsgroups: comp.lang.lisp
Subject: substitution in sequences
Message-ID: <425@ai.cs.utexas.edu>
Date: 30 Aug 89 20:54:36 GMT
Organization: U. Texas CS Dept., Austin, Texas
Lines: 20

Is there an elegant way to perform substitutions in a sequence where
the new item may be of a different length than the old item?  E.g.

(substitute-it "Common lisp, the Language" "CLtL"
		"The right function does not seem to be in CLtL.")
=>
"The right function does not seem to be in Common Lisp, the Language."

or (substitute-it "abc" "1" "10101") 
=>
 "abc0abc0abc"

Even better would be a function which took a list of (new . old) pairs
and substituted the corresponding NEW for each OLD occuring in the
sequence. 

Thanks,	
	Adam Farquhar.