Update ldict-keys.
This commit is contained in:
parent
ac1c5d28c6
commit
5533a3256e
2 changed files with 9 additions and 2 deletions
|
@ -90,6 +90,12 @@ the dictionary does not contain the key ```k```, an error is raised.
|
||||||
Sets existing key ```k``` to the new value ```v``` or inserts it if it
|
Sets existing key ```k``` to the new value ```v``` or inserts it if it
|
||||||
is not already present in the dictionary ```ld```.
|
is not already present in the dictionary ```ld```.
|
||||||
|
|
||||||
|
(ldict-keys ld)
|
||||||
|
|
||||||
|
* ```ld``` - a ldict instance
|
||||||
|
|
||||||
|
Returns the list of keys stored in given dictionary.
|
||||||
|
|
||||||
### IO
|
### IO
|
||||||
|
|
||||||
(import util-io)
|
(import util-io)
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
|
|
||||||
ldict-remove
|
ldict-remove
|
||||||
ldict-set
|
ldict-set
|
||||||
|
|
||||||
ldict-keys
|
ldict-keys
|
||||||
ldict-map
|
ldict-map
|
||||||
ldict-filter
|
ldict-filter
|
||||||
|
@ -144,8 +145,8 @@
|
||||||
(cons (car pairs) res)))))))
|
(cons (car pairs) res)))))))
|
||||||
|
|
||||||
;; Returns the list of keys stored in given dictionary.
|
;; Returns the list of keys stored in given dictionary.
|
||||||
(define (dict-keys d)
|
(define (ldict-keys ld)
|
||||||
(map car d))
|
(map car (ldict-pairs ld)))
|
||||||
|
|
||||||
;; Maps dictionary values, the procedure gets key-value pairs if it
|
;; Maps dictionary values, the procedure gets key-value pairs if it
|
||||||
;; accepts more than one argument. If it accepts a third argument,
|
;; accepts more than one argument. If it accepts a third argument,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue