Update ldict-keys.

This commit is contained in:
Dominik Pantůček 2023-04-09 19:47:17 +02:00
parent ac1c5d28c6
commit 5533a3256e
2 changed files with 9 additions and 2 deletions

View file

@ -39,6 +39,7 @@
ldict-remove
ldict-set
ldict-keys
ldict-map
ldict-filter
@ -144,8 +145,8 @@
(cons (car pairs) res)))))))
;; Returns the list of keys stored in given dictionary.
(define (dict-keys d)
(map car d))
(define (ldict-keys ld)
(map car (ldict-pairs ld)))
;; Maps dictionary values, the procedure gets key-value pairs if it
;; accepts more than one argument. If it accepts a third argument,