guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Functional hashtables


From: Christopher Lemmer Webber
Subject: Re: Functional hashtables
Date: Wed, 06 May 2020 07:23:33 -0400
User-agent: mu4e 1.2.0; emacs 26.3

Linus Björnstam 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=default
>
> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]