### sequence function: sread

description:
sread(positions) input-seq
the sequence read function
positions can be either superpositions, sequences or mixed
the resulting sequence will have the same "shape" as positions.
if any of the positions are not integers, then |> will be returned for that slot
if any of the positions are out of range, then |> will be returned for that slot
index values start at 1, not 0. So 1 is the first element, 2 is the 2nd element, and so on.
negative index values work too. eg, -1 is the last element in the sequence, -2 is the 2nd last, and so on.
examples:
-- the superposition case:
sread(|2> + |3> + |5>) ssplit |abcdefg>
|b> + |c> + |e>
-- the sequence case:
sread(|2> . |3> . |5>) ssplit |abcdefg>
|b> . |c> . |e>
see also:
sread-range, swrite, swrite-range, sselect

Home