rotate   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

;; rotate list
(define rotate
   (lambda (lst amt)
      (let loop ((l (if (> amt 0) (reverse lst) lst))
     (cnt (abs amt)))
   (if (<= cnt 0)
       (if (> amt 0) (reverse l) l)
       (loop (append (cdr l) (list (car l)))
       (- cnt 1))))))


Back to Index

Similar Entries

  • cpTransformRotate    xtlang
  • cpvrotate    xtlang
  • rotate    xtlang
  • rotate-joint    xtlang
  • rotate_matrix    xtlang
  • rotate_matrix    xtlang
  • varotate    xtlang
  • varotate    xtlang
  • vrotate    xtlang
  • xtm_path_rotate    xtlang
  • xtm_path_rotated    xtlang
  • xtm_vgimage_rotate    xtlang
  • xtm_vgimage_rotated    xtlang