[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] extend map-into
From: |
Andrea Corallo |
Subject: |
Re: [PATCH] extend map-into |
Date: |
Sun, 06 Oct 2019 20:59:50 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) |
Stefan Monnier <address@hidden> writes:
> [ I added Nicolas explicitly in the list, in case he's too busy to read
> all messages. ]
>
>> would a solution like the one in attached patch do the job?
>
> Yes and no: it does the job, but only for `map-into`. So that doesn't
> immediately cover the needs of `map-merge` and other callers of
> `map-into` (e.g. the `map-values-apply` I suggested which would return
> a new map).
>
> I guess we could use a `type` that's not a symbol but a list (whose
> head is a symbol and the rest are the args), but it could be a bit
> inconvenient (and would impact efficiency as well because it makes the
> cl-generic dispatch more complex).
Cool, is the attached patch doing what you suggest?
> On a related note, maybe it would be good to have map.el primitives that
> let you create a new map of the same type as another (preserving :test).
>
>> + (let* ((h-args (if keyword-args
>> + keyword-args
>> + (list :size (map-length map) :test 'equal)))
>
> Aka (or keyword-args (list :size (map-length map) :test 'equal))
>
ops :D
> Stefan
>
Bests
Andrea
--
address@hidden
0001-Extend-map-into-for-better-control-on-hash-table-cre.patch
Description: Text Data
- RE: new function proposal alist-to-hash, (continued)
- RE: new function proposal alist-to-hash, Drew Adams, 2019/10/03
- Re: new function proposal alist-to-hash, Stefan Monnier, 2019/10/03
- Re: new function proposal alist-to-hash, Andrea Corallo, 2019/10/04
- [PATCH] extend map-into (was: new function proposal alist-to-hash), Andrea Corallo, 2019/10/05
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/06
- Re: [PATCH] extend map-into,
Andrea Corallo <=
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/08
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/08
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/08
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/09
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/09
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/09
- Re: [PATCH] extend map-into, Nicolas Petton, 2019/10/10
- Re: [PATCH] extend map-into, Nicolas Petton, 2019/10/10
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/10
- Re: [PATCH] extend map-into, Nicolas Petton, 2019/10/10