anchor.diff:  #|
   
   
  -|#+|#
  
positive.code: (defun mapi (f m)
    (declare (dynamic-extent f))
    (let* ((curr-m (map-as-undo-harray-assure-current m))
  	 (table (map-as-undo-harray--harray m))
  	 (result (if (eq curr-m m)
  		     (copy-hash-table table)
  		   table)))
      (maphash #'(lambda (key val)
  		 (setf (gethash key result)
  		       (mkSome (funcall f (cons key (cdr val))))))
  	     result)
      (make-map-as-undo-harray result nil)))
  
  (defun |!map| (f m)
    (declare (dynamic-extent f))
    (let* ((curr-m (map-as-undo-harray-assure-current m))
  	 (table (map-as-undo-harray--harray m))
  	 (result (if (eq curr-m m)
  		     (copy-hash-table table)
  		   table)))
      (maphash #'(lambda (key val)
  		 (setf (gethash key result)
  		       (mkSome (funcall f (cdr val)))))
  	     result)
      (make-map-as-undo-harray result nil)))
  
  (defun app (f m)
  
negative.code: (defmacro map-as-undo-harray--mark-non-current (m)
     `(setf (svref ,m 1) nil))
  
  (defun make-hash-table-same-size (table)
    (make-hash-table :test 'equal
  		   :size (hash-table-count table)
  		   :rehash-size
  		   *map-as-undo-harray--rehash-size*))
  
  (defun copy-hash-table (table)
    (let ((result (make-hash-table-same-size table)))
      (maphash #'(lambda (key val) (setf (gethash key result) val))
  	     table)
      result))
  