Function: calcFunc-subvec
calcFunc-subvec is an autoloaded and byte-compiled function defined in
calc-vec.el.gz.
Signature
(calcFunc-subvec VEC START &optional END)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-vec.el.gz
;;; Return a subvector of a vector.
(defun calcFunc-subvec (vec start &optional end)
(setq start (math-check-fixnum start t)
end (math-check-fixnum (or end 0) t))
(or (math-vectorp vec) (math-reject-arg vec 'vectorp))
(let ((len (1- (length vec))))
(if (<= start 0)
(setq start (+ len start 1)))
(if (<= end 0)
(setq end (+ len end 1)))
(if (or (> start len)
(<= end start))
'(vec)
(setq vec (nthcdr start vec))
(if (<= end len)
(let ((chop (nthcdr (- end start 1) (setq vec (copy-sequence vec)))))
(setcdr chop nil)))
(cons 'vec vec))))