Re: [Newbie] removing an element from a sequence




An[z]elmus wrote:
Function remove (or delete) eliminate all the occurences of an item in
a sequence.
for example:
(remove #\a "adagio") ----> "dgio"
Let say that I need to remove only one occurence at a time, for exmple
I may need to remove the #\a at index 2 in "adagio" and obtain
as a result "adgio".

You mean like:

(remove #\a "adagio" :start 2 :count 1)


I have not yet figured out how to do it properly.

Look at <http://www.lisp.org/HyperSpec/FrontMatter/index.html> to find
teh full documentation of the Lisp functions.

--
Thomas A. Russ, USC/Information Sciences Institute




.



Relevant Pages

  • Re: [Newbie] removing an element from a sequence
    ... a sequence. ... Let say that I need to remove only one occurence at a time, for exmple I may need to remove the #\a at index 2 in "adagio" and obtain ... 1st European Lisp Symposium ...
    (comp.lang.lisp)
  • Re: removing an element from a sequence
    ... a sequence. ... Let say that I need to remove only one occurence at a time, ... exmple I may need to remove the #\a at index 2 in "adagio" and obtain ... element based on its position/index. ...
    (comp.lang.lisp)
  • Re: limitation to induction on finite bounds
    ... (Occurence Introduction 1) ... sequence is a member -> sequence occurs ... Do you agree or disagree that rule Non-Occurence Introduction 1 ... since for all lengths of the string 0.3333.. ...
    (sci.math)
  • Re: limitation to induction on finite bounds
    ... (Occurence Introduction 1) ... sequence is a member -> sequence occurs ... Do you agree or disagree that rule Non-Occurence Introduction 1 ... since for all lengths of the string 0.3333.. ...
    (sci.logic)
  • RE: Complications with formulas
    ... sheets) and a Summary sheet at the beginning. ... SEQUENCE OF TWO ZEROS ... if value returned is positive then it counts as 1 occurence. ... formula cell will keep counting to the total times it returned a positive ...
    (microsoft.public.excel.misc)