From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: new function proposal alist-to-hash Date: Thu, 03 Oct 2019 22:07:24 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="178786"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 04 00:10:10 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iG9IY-000kOf-FG for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 00:10:10 +0200 Original-Received: from localhost ([::1]:40448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iG9IW-0004A7-TX for ged-emacs-devel@m.gmane.org; Thu, 03 Oct 2019 18:10:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41857) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iG9G6-00047j-Vg for emacs-devel@gnu.org; Thu, 03 Oct 2019 18:07:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iG9G4-0006kc-Eo for emacs-devel@gnu.org; Thu, 03 Oct 2019 18:07:38 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:61274) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iG9Fw-0006gu-Ts for emacs-devel@gnu.org; Thu, 03 Oct 2019 18:07:32 -0400 Original-Received: from sdf.org (IDENT:akrl@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id x93M7OqK013469 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Thu, 3 Oct 2019 22:07:24 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id x93M7O8A021387; Thu, 3 Oct 2019 22:07:24 GMT In-Reply-To: (Stefan Monnier's message of "Thu, 03 Oct 2019 17:56:16 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240535 Archived-At: Stefan Monnier 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