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 1
1
(require 'cl-seq )
2
2
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 )
9
4
" Append ELEM to the end of the list.
10
5
11
6
This is like `cons' , but operates on the end of list.
12
7
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)))
15
10
16
11
(defun nthrev (n lst )
17
12
" 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."
39
34
(dolist (point (cddr points))
40
35
(while (not (is-ccw (nthrev 1 hull) (nthrev 0 hull) point))
41
36
(setq hull (-remove-at (1- (length hull)) hull)))
42
- (setq hull (- snoc hull point)))
37
+ (setq hull (snoc hull point)))
43
38
hull))
44
39
45
40
(princ
You can’t perform that action at this time.
0 commit comments