Re: removing an element from a sequence
- From: William James <w_a_x_man@xxxxxxxxx>
- Date: Tue, 4 Mar 2008 18:47:32 -0800 (PST)
On Mar 4, 4:39 pm, "An[z]elmus" <some...@xxxxxxxxxxxxx> 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".
In other words, it would be handy to have a function that remove an
element based on its position/index.
I have not yet figured out how to do it properly.
newLISP v.9.3.0 on Win32, execute 'newlisp -h' for more info.
(set 's "adagio")"adagio"
(nth-set (s 2) "")"a"
s"adgio"
.
- References:
- [Newbie] removing an element from a sequence
- From: An[z]elmus
- [Newbie] removing an element from a sequence
- Prev by Date: Re: removing an element from a sequence
- Next by Date: Chicago Lisp Meetup!
- Previous by thread: Re: removing an element from a sequence
- Next by thread: SF East Bay Area Lisp Meetup
- Index(es):
Relevant Pages
|