(setq vec [foo bar baz]) ;; [foo bar baz] (aref vec 0) ;; foo (aref vec 2) ;; baz (cl-rotatef (aref vec 0) (aref vec 2)) vec ;; [baz bar foo]