anchor.diff:                                        last-gen)))
          last-gen))
   
  +(defun strings->char-lists (lst)
  +   (if (null lst)
  +       nil
  +       (cons (coerce (car lst) 'list) (strings->char-lists (cdr lst)))))
  +
  +(defun stdin->avl-tree (state)
  +   (mv-let (input-lines state)
  +           (stdin->lines state)
  +      (let* (#|(height (len input-lines))|#
  +             (width (length (car input-lines))))
  +            (mv (input-lines->avl-tree 0 0 width (strings->char-lists input-lines) (empty-tree)) state))))
  +            ;(mv (input-lines->avl-tree 0 0 width (strings->char-lists input-lines) (empty-tree)) width height state))))
  +
   
   ;added n counter
   (defun num-live-neighbors (n width height x y last-gen)
  
positive.code:                                                                                               (coerce "    " 'list))
                                                                                                (empty-tree))
                                                                 (empty-tree)))
  
  (defun main (state)
  	(string-list->stdout (avl-tree->output-lines 4 4 0 (build-next-generation 4 4 0 (input-lines->avl-tree 0 0 4 (list (coerce " x  " 'list)
  		                                                                                          (coerce "xx  " 'list)
  		                                                                                          (coerce "    " 'list)
  		                                                                                          (coerce "    " 'list))
  		                                                                                          (empty-tree))
  		                                                           (empty-tree))) state))
negative.code: (defun build-next-generation-cell (width height x y last-gen next-gen)
     (let* ((n (num-live-neighbors 0 width height x y last-gen))
            (result (if (null (avl-retrieve last-gen (get-avl-key x y width)))
                        (if (= n 3) "x" nil)
                        (if (or (< n 2) (> n 3)) nil "x"))))
           (if result
               (avl-insert next-gen (get-avl-key x y width) result)
               next-gen)))
                  
  ; added curx counter
  (defun build-next-generation-row (width height curx y last-gen next-gen)
  