emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/helm 60ed8db148 3/4: Use mapcan in helm-fast-remove-dups


From: ELPA Syncer
Subject: [nongnu] elpa/helm 60ed8db148 3/4: Use mapcan in helm-fast-remove-dups
Date: Sat, 4 Nov 2023 15:59:58 -0400 (EDT)

branch: elpa/helm
commit 60ed8db14881f02f08d3e29a98f8b0a9d44ad4fa
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Use mapcan in helm-fast-remove-dups
---
 helm-lib.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index 10e56706f4..d290d5cd3c 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -875,10 +875,11 @@ This is a bug in `puthash' which store the printable
 representation of object instead of storing the object itself,
 this to provide at the end a printable representation of
 hashtable itself."
-  (cl-loop with cont = (make-hash-table :test test)
-           for elm in seq
-           unless (gethash elm cont)
-           collect (puthash elm elm cont)))
+  (let ((table (make-hash-table :test test)))
+    (mapcan (lambda (x)
+              (unless (gethash x table)
+                (list (puthash x x table))))
+            seq)))
 
 (defsubst helm--string-join (strings &optional separator)
   "Join all STRINGS using SEPARATOR."



reply via email to

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