[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49407: Request: Specify default values in `map-let` in Map.el
From: |
Okam |
Subject: |
bug#49407: Request: Specify default values in `map-let` in Map.el |
Date: |
Sun, 04 Jul 2021 23:08:55 +0000 |
Hello,
`map-let` allows one to conveniently bind variables using `map-elt`, but
does not provide a way specify a default value if a key is missing.
With `map-elt`, one can use the optional third argument to specify this
value. It would be good to have this in `map-let` as well.
For example, maybe it could look something like
;; As just a third value in the list:
(let ((map '(:a 1 :b 2)))
(map-let ((:a a)
(:b b)
(:c c 3))
map
(+ a b c)))
or
;; More like Common Lisp arg-list for `&key'.
(let ((map '(:a 1 :b 2)))
(map-let ((:a a)
(:b b)
(:c (c 3)))
map
(+ a b c)))
Please consider adding this feature.
Thank you.
- bug#49407: Request: Specify default values in `map-let` in Map.el,
Okam <=