+ (cond
+ ((listp seq)
+ (if b
+ (let ((diff (- b a)))
+ (cond
+ ((zerop diff) ())
+ ((minusp diff)
+ (error "Start index must be smaller than end index"))
+ (t
+ (let* ((drop-a (nthcdr a seq))
+ (pointer drop-a))
+ (dotimes (n (1- diff))
+ (setq pointer (cdr pointer))
+ (when (null pointer)
+ (error "Ending index larger than length of list")))
+ (setf (cdr pointer) nil)
+ drop-a))))
+ (nthcdr a seq)))
+ ((arrayp seq)
+ (if b
+ (slice seq a b)
+ (slice seq a)))
+ (t (not-seq-error seq))))