unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <akrl@sdf.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: new function proposal alist-to-hash
Date: Thu, 03 Oct 2019 22:07:24 +0000	[thread overview]
Message-ID: <xjfd0fdlbz7.fsf@sdf.org> (raw)
In-Reply-To: <jwvblux335l.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 03 Oct 2019 17:56:16 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I'd like to propose a new simple function called alist-to-hash to make
>> hash-tables from a-lists.
>
> I think `map-into` does that:
>
>     (map-into '((a . 1) (b . 2)) 'hash-table)
>     
>
> -- Stefan

Cool good to know!
The only thing is that this is not recursive.
I think having it recursive make the use quite lighter in cases with
nesting.

Bests
  Andrea

-- 
akrl@sdf.org



  reply	other threads:[~2019-10-03 22:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 21:25 new function proposal alist-to-hash Andrea Corallo
2019-10-03 21:40 ` Drew Adams
2019-10-03 21:56 ` Stefan Monnier
2019-10-03 22:07   ` Andrea Corallo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-10-04  9:58 Andrea Corallo
2019-10-04 19:16 ` Stefan Monnier
2019-10-05  8:18   ` Andrea Corallo
2019-10-05 15:13     ` Stefan Monnier
2019-10-05 15:45       ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xjfd0fdlbz7.fsf@sdf.org \
    --to=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).