built in operators: srotate-right


srotate-right:
    description:
        srotate-right input-seq
        rotate the input sequence right one step

        srotate-right[n] input-seq
        rotate the input sequence right n steps, modulus size(input-seq)

    examples:
        srotate-right (|one> . |two> . |three> . |four> . |five>)
            |five> . |one> . |two> . |three> . |four>

        srotate-right[3] (|one> . |two> . |three> . |four> . |five>)
            |three> . |four> . |five> . |one> . |two>

        -- 11 mod 5 == 1, so rotate right 1 step:
        srotate-right[11] (|one> . |two> . |three> . |four> . |five>)
            |five> . |one> . |two> . |three> . |four>

    see also:
        srotate-left, rotate-right, rotate-left
Home