bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#34708: alist-get has unclear documentation


From: Michael Heerdegen
Subject: bug#34708: alist-get has unclear documentation
Date: Mon, 04 Mar 2019 17:38:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I think it would be nice to have an example that shows both a common
> use-case (as an accumulator), and how to use REMOVE. I started off with
> the accumulator part:
>
> (let (word word-freq)
>   (while (setq word (pop word-list))
>     (cl-incf (alist-get word word-freq 0 #'equal) 1)))
>
> But so far haven't come up with a non-contrived way to work REMOVE in
> there...

And I guess you didn't really want to specify a function as REMOVE arg,
right?

Michael.





reply via email to

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