diff options
author | William Carroll <wpcarro@gmail.com> | 2020-09-02T14·23+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-09-02T14·23+0100 |
commit | f089f3c550af5237e6748913f21084115499782d (patch) | |
tree | 9d6d9e44b81801c65a197bfb5ac9e72ecea782bd /emacs/.emacs.d/wpc/tree.el | |
parent | ea274f924a637b3c32be0c19c961897ceacfae7c (diff) |
Linting Elisp
TL;DR: - Prefer cl-lib - Prefer spaces to tabs - Resolve various checkdoc complaints
Diffstat (limited to 'emacs/.emacs.d/wpc/tree.el')
-rw-r--r-- | emacs/.emacs.d/wpc/tree.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/emacs/.emacs.d/wpc/tree.el b/emacs/.emacs.d/wpc/tree.el index 4af383a8c088..ae5fba7950c9 100644 --- a/emacs/.emacs.d/wpc/tree.el +++ b/emacs/.emacs.d/wpc/tree.el @@ -37,7 +37,7 @@ (require 'series) (require 'random) (require 'maybe) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library @@ -116,9 +116,11 @@ Depth-first traversals have the advantage of typically consuming less memory (cl-defun tree-random (&optional (value-fn (lambda (_) nil)) (branching-factor 2)) - "Randomly generate a tree with BRANCHING-FACTOR using VALUE-FN to compute the -node values. VALUE-FN is called with the current-depth of the node. Useful for -generating test data. Warning this function can overflow the stack." + "Randomly generate a tree with BRANCHING-FACTOR. + +This uses VALUE-FN to compute the node values. VALUE-FN is called with the +current-depth of the node. Useful for generating test data. Warning this +function can overflow the stack." (cl-labels ((do-random (d vf bf) (make-node |