function 1: not-sread


not-sread:
    description:
        not-sread(positions) input-seq
        remove superpositions from the input sequence if they are in 'positions'
        index values start from 1, not 0
        negative values are also valid, so -1 is last element, -2 is second last element, etc
        if out of range, then ignore that index value
        'positions' can be a superposition or a sequence, it doesn't matter
        if it is a sequence, it is converted to a superposition anyway
        the order of the indices in 'positions' is ignored, since they are inserted into a set

    examples:
        -- remove the 1st, 3rd and 5th superpositions from the input sequence:
        not-sread(|1> + |3> + |5>) (|one> . |two> . |three> . |four> . |five> . |six> . |seven>)
            |two> . |four> . |six> . |seven>

        -- remove the 2nd last, and the 4th last superpositions from the input sequence:
        not-sread(|-2> + |-4>) (|one> . |two> . |three> . |four> . |five> . |six> . |seven>)
            |one> . |two> . |three> . |five> . |seven>

    see also:
        sread, read, not-read

Home