Re: Dynamic Sequences

new topic     » goto parent     » topic index » view thread      » older message » newer message

Michael Bolin wrote:
>Suppose you have a sequence called S, and want to delete element N:

>S = S[1..N - 1] & S[N + 1..length(S)]

>You could also make a function called remove() or something to do
>this.

By the way, the same approach works for adding an element to the middle of a
sequence.  To add an element E to sequence S at position P:

S = S[1..P-1] & E & S[P..length(S)]


Colin Taylor
71630.1776 at compuserve.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu