[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] New package: hap.el
From: |
Nicolas Petton |
Subject: |
Re: [ELPA] New package: hap.el |
Date: |
Thu, 02 Mar 2017 10:03:28 +0100 |
Stefan Monnier <address@hidden> writes:
>> In hap.el, optionally, you can convert from alist to hash table,
>> so that:
>> (let ((map '((1 . a) (1 . foo) (2 . b))))
>> (equal
>> (alist-get 1 map)
>> (gethash 1 (map-into map 'hash-table))))
>> => t
>
> Oh, you've just found a bug in map.el. The intention is that it returns t.
Yes, indeed. The bug is actually in `map-apply':
(let ((map '((1 . a) (1 . foo) (2 . b))))
(map-apply (lambda (key val) key)
map)) ;; => (1 1 2)
I guess we don't want to iterate over duplicate keys.
Cheers,
Nico
signature.asc
Description: PGP signature
- [ELPA] New package: hap.el, Tino Calancha, 2017/03/01
- Re: [ELPA] New package: hap.el, Mark Oteiza, 2017/03/01
- Re: [ELPA] New package: hap.el, Stefan Monnier, 2017/03/01
- Re: [ELPA] New package: hap.el, Tino Calancha, 2017/03/02
- Re: [ELPA] New package: hap.el, Stefan Monnier, 2017/03/02
- Re: [ELPA] New package: hap.el, Tino Calancha, 2017/03/02
- Re: [ELPA] New package: hap.el,
Nicolas Petton <=
- Re: [ELPA] New package: hap.el, Tino Calancha, 2017/03/02
- Re: [ELPA] New package: hap.el, Nicolas Petton, 2017/03/02
- Re: [ELPA] New package: hap.el, Nicolas Petton, 2017/03/02
- Re: [ELPA] New package: hap.el, Tino Calancha, 2017/03/02