anchor.diff:                       :documentation "A list/sequence of initial-contents to be iterated")
      (initial-element :initform nil :initarg :initial-element
                       :documentation "When supplied and no initial-contents supplied, iteration returns the value instead of the index")
  -   (bound-check :initform #'<= :initarg :from-end
  +   (bound-check :initform #'< :initarg :from-end
                   :documentation "When T, direction of iteration is from-end")
  -   (comparer :initform #'nth
  +   (accessor :initform #'nth
                :documentation "Function to access to individual members of a initial-contents, #'nth for lists, #'elt for others")))
   
   (defmethod reset ((iter iterator))
  
positive.code:           :documentation "The start of the iteration, either an index value or integer value to mark the start of iteration")
     (index :initform 0
            :documentation "the current index of the iteration") 
     (length :initform -1 :initarg :length
             :documentation "The length of the iteration, -1 denotes an infinite iteration, for lists/sequences, the sequence length limits the iteration")
     (increment :initform 1 :initarg :inc
                :documentation "the increment of the iteration")
     (id :initform #'identity :initarg :id
  
negative.code:      while (and i j)
       collect (cons i j)))
  
  (defmacro make-iterator (&key (start 0) (end -1) (inc 1) (id #'identity) (cyclic nil)
                             (initial-contents ()) (from-end nil) (initial-element nil))
    `(let ((tmp (make-instance 'iterator :start (or ,start 0)
                               :end (or (when (not (null ,initial-contents))
                                          (let ((tmp (length ,initial-contents)))
                                               (if (= ,end -1)
                                                   tmp
                                                   (when (>= ,end tmp)
                                                     (error "length out of bounds")))))
                                        ,end)
                               :inc ,inc :id ,id :cyclic ,cyclic
                               :initial-contents ,initial-contents
                               :initial-element ,initial-element)))
       (with-slots (start end index initial-contents increment accessor bound-check) tmp
         (when (not (listp initial-contents))
           (setf accessor #'(lambda(n seq) (elt seq n))))
         (if ,from-end
             (progn
               (rotatef start end)
               (setf index start
                     bound-check #'>
                     increment (* -1 ,inc)))
             (setf index start)))
       tmp))
  
  (defmacro with-iterator ((name &key (start 0) (end -1) (increment 1)
                                 (initial-contents nil) (id #'identity)) &body body)
    `(let ((,name (make-iterator :start ,start :end ,end
                                 :inc ,increment :id ,id
                                 :initial-contents ,initial-contents)))
       ,@body))
  
  (defmethod to-string ((iter iterator))
    (with-slots (start end increment id quiet initial-contents cyclic) iter
      (format T "start: ~A, end: ~A, quiet: ~A, inc: ~A, cyclic: ~A, initial-contents: ~A ~%"
              start end quiet increment cyclic initial-contents)))
  
  (defun get-sequence-iter-varlist (all-clauses)
    (list
     (loop for clause in all-clauses
        for var-name = (first clause)
        for tmp = (second clause)
        for iter-tmp = (if (listp tmp) (eval tmp) tmp)
        for result-tmp = (nth 2 clause)
        collect `(,var-name (next ,iter-tmp) (or (next ,iter-tmp) ,result-tmp)))
  