about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/tree.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-09-01T09·17+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-09-01T09·17+0100
commitfb5ec068ddd50f6bce41c7a0bad45673db787940 (patch)
tree19b4ff96983c08f451e7da5f58c95b8f6090ec84 /emacs/.emacs.d/wpc/tree.el
parenta638e15c0dd14a25e6f032b08de5ee1575677497 (diff)
More Elisp linting
This should cover most of the remaining linting errors. After this, I expect
fewer than ten linting errors.
Diffstat (limited to 'emacs/.emacs.d/wpc/tree.el')
-rw-r--r--emacs/.emacs.d/wpc/tree.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/emacs/.emacs.d/wpc/tree.el b/emacs/.emacs.d/wpc/tree.el
index b7caf073a210..693748e467b9 100644
--- a/emacs/.emacs.d/wpc/tree.el
+++ b/emacs/.emacs.d/wpc/tree.el
@@ -72,14 +72,14 @@ Depth-first traversals have the advantage of typically consuming less memory
                  (if (or (maybe-nil? node)
                          (tree-leaf? node))
                      acc-new
-                   (list/reduce
+                   (list-reduce
                     acc-new
                     (lambda (node acc)
                       (tree-do-reduce-depth
                        acc
                        f
                        node
-                       (number/inc depth)))
+                       (number-inc depth)))
                     (node-children node))))))
     (do-reduce-depth acc f node 0)))
 
@@ -94,13 +94,13 @@ Depth-first traversals have the advantage of typically consuming less memory
 ;; above.
 (defun tree-leaf-depths (xs)
   "Return a list of all of the depths of the leaf nodes in XS."
-  (list/reverse
+  (list-reverse
    (tree-reduce-depth
     '()
     (lambda (node acc depth)
       (if (or (maybe-nil? node)
               (tree-leaf? node))
-          (list/cons depth acc)
+          (list-cons depth acc)
         acc))
     xs)))
 
@@ -122,8 +122,8 @@ generating test data.  Warning this function can overflow the stack."
                (d vf bf)
                (make-node
                 :value (funcall vf d)
-                :children (->> (series/range 0 (number/dec bf))
-                               (list/map
+                :children (->> (series/range 0 (number-dec bf))
+                               (list-map
                                 (lambda (_)
                                   (when (random-boolean?)
                                     (do-random d vf bf))))))))
@@ -147,9 +147,9 @@ A tree is balanced if none of the differences between any two depths of two leaf
   nodes in XS is greater than N."
   (> n (->> xs
             tree-leaf-depths
-            set/from-list
-            set/count
-            number/dec)))
+            set-from-list
+            set-count
+            number-dec)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Tests