Skip to content

hash-map-entry

Type ​

meta-lisp
(all (K1 V1 K2 V2)
  (-> (hash-t K1 V1)
      (-> (pair-t K1 V1) (pair-t K2 V2))
      (hash-t K2 V2)))

Description ​

Map a function over entries.

Examples ​

meta-lisp
(hash-map-entry
  (@hash 1 2 3 4)
  (lambda (e)
    (make-pair
      (iadd 1 (pair-first e))
      (iadd 1 (pair-second e)))))
;; => (@hash 2 3 4 5)