about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/list.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-09-02T13·09+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-09-02T13·09+0100
commit4a6937106559892f601999a6f3cae9beff1fe5f1 (patch)
tree98bc85caf2bad8ea4780a57b29e000b61ca718f5 /emacs/.emacs.d/wpc/list.el
parentdffb224023e3a663afc4b7461a94c0777fa8dd97 (diff)
General Elisp linting
TL;DR:
- Remove `require` statements from init.el
- Remove unused, auto-install KBDs for bookmark.el
- Remove unused `require` statements from clipboard
- Remove unused, commented-out code

I would like for an Elisp linting stage to test for unused `require` statements,
but I'm unsure how practical that is to support.
Diffstat (limited to 'emacs/.emacs.d/wpc/list.el')
-rw-r--r--emacs/.emacs.d/wpc/list.el22
1 files changed, 0 insertions, 22 deletions
diff --git a/emacs/.emacs.d/wpc/list.el b/emacs/.emacs.d/wpc/list.el
index 00ff2affcc8a..cc91ac1eaf60 100644
--- a/emacs/.emacs.d/wpc/list.el
+++ b/emacs/.emacs.d/wpc/list.el
@@ -128,28 +128,6 @@
   "Return over `XS' calling `F' on an element in `XS'and `ACC'."
   (-reduce-from (lambda (acc x) (funcall f x acc)) acc xs))
 
-;; TODO: Support this. It seems like `alist-set' is not working as I expected it
-;; to. Perhaps we should add some tests to confirm the expected behavior.
-;; (cl-defun list-index (f xs &key (transform (lambda (x) x)))
-;;   "Return a mapping of F applied to each x in XS to TRANSFORM applied to x.
-;; The TRANSFORM function defaults to the identity function."
-;;   (->> xs
-;;        (list-reduce (alist-new)
-;;                     (lambda (x acc)
-;;                       (let ((k (funcall f x))
-;;                             (v (funcall transform x)))
-;;                         (if (alist-has-key? k acc)
-;;                             (setf (alist-get k acc) (list v))
-;;                           (setf (alist-get k acc) (list v))))))))
-;; (prelude-assert
-;;  (equal '(("John" . ("Cleese" "Malkovich"))
-;;           ("Thomas" . ("Aquinas")))
-;;         (list-index (lambda (x) (plist-get x :first-name))
-;;                     '((:first-name "John" :last-name "Cleese")
-;;                       (:first-name "John" :last-name "Malkovich")
-;;                       (:first-name "Thomas" :last-name "Aquinas"))
-;;                     :transform (lambda (x) (plist-get x :last-name)))))
-
 (defun list-map (f xs)
   "Call `F' on each element of `XS'."
   (-map f xs))