From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Christopher Lemmer Webber Newsgroups: gmane.lisp.guile.user Subject: Re: Functional hashtables Date: Wed, 06 May 2020 07:23:33 -0400 Message-ID: <87pnbhqpca.fsf@dustycloud.org> References: <87r1vyqml1.fsf@dustycloud.org> <3d7c4c18-94ec-4a11-ac66-2448f017dcf0@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="130158"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.2.0; emacs 26.3 Cc: guile-user To: Linus =?utf-8?Q?Bj=C3=B6rnstam?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed May 06 13:23:46 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWI9S-000Xmx-OU for guile-user@m.gmane-mx.org; Wed, 06 May 2020 13:23:46 +0200 Original-Received: from localhost ([::1]:40618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWI9R-0003lM-Ql for guile-user@m.gmane-mx.org; Wed, 06 May 2020 07:23:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWI9J-0003lE-29 for guile-user@gnu.org; Wed, 06 May 2020 07:23:37 -0400 Original-Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:55212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWI9H-00034c-A6 for guile-user@gnu.org; Wed, 06 May 2020 07:23:36 -0400 Original-Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id ACA122661A; Wed, 6 May 2020 07:23:33 -0400 (EDT) In-reply-to: <3d7c4c18-94ec-4a11-ac66-2448f017dcf0@www.fastmail.com> Received-SPF: pass client-ip=2600:3c02::f03c:91ff:feae:cb51; envelope-from=cwebber@dustycloud.org; helo=dustycloud.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16433 Archived-At: Linus Bj=C3=B6rnstam writes: > I made a module out of Andy's dash (and added some comfort functions > over fash-fold): > https://hg.sr.ht/~bjoli/guile-fash/browse/fash.scm?rev=3Ddefault > > What it lacks is a proper way to remove elements..I had a couple of > stabs at it, but I fear I was too dumb. Ah excellent! I could contribute fash-keys, fash-values, fash-map, and fash-for-each. Those shouldn't be too difficult to do. As for deleting elements, why don't we take the simple way for now? Let's make a procedure that just uses fash-fold and copies over to a new fash, sans the removed element. We can note that it's O(n) but that a faster version is possible but needs to be writtten. What do you think? - Chris