File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
contents/graham_scan/code/elisp Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 11(require 'cl-seq )
22
3- (defun -concat (&rest lists)
4- " Return a new list with the concatenation of the elements in the supplied LISTS."
5- (declare (pure t ) (side-effect-free t ))
6- (apply 'append lists))
7-
8- (defun -snoc (list elem &rest elements)
3+ (defun snoc (list elem )
94 " Append ELEM to the end of the list.
105
116This is like `cons' , but operates on the end of list.
127
13- If ELEMENTS is non nil, append these to the list as well ."
14- (-concat list (list elem) elements ))
8+ Adapted from dash.el ."
9+ (append list (list elem)))
1510
1611(defun nthrev (n lst )
1712 " Return the Nth element of LST from the end."
@@ -39,7 +34,7 @@ If ELEMENTS is non nil, append these to the list as well."
3934 (dolist (point (cddr points))
4035 (while (not (is-ccw (nthrev 1 hull) (nthrev 0 hull) point))
4136 (setq hull (-remove-at (1- (length hull)) hull)))
42- (setq hull (- snoc hull point)))
37+ (setq hull (snoc hull point)))
4338 hull))
4439
4540(princ
You can’t perform that action at this time.
0 commit comments