;;AUTOLOAD: maphash
;;AUTODOC: maphash "apply function on each entry of a hash table"
;;Usage:  (maphash function hashtable )
;;	(maphash function P-list )
;;
;;This function applies function with two arguments: each key and the 
;;corresponding value in the hashtable hashtable or the property 
;;list P-list. The function always returns nil.
;;
;;(defmacro foo (key val)
;;" Print the argument key if argument val is less than zero"
;;	'(if (< val 0) (print key " ")))
;;(setq my_list '(k1 2 k2 -1 k3 -2))
;;(maphash 'foo my_list)				 k2 k3 
;;(maphash foo (coerce my_list Hashtable))	 k2 k3 

(defmacro maphash (func table)
  `(dohash (maphash:k maphash:v ,table)
    (apply ,func (list maphash:k maphash:v))
))
