Skip to content

Commit 01dbb1d

Browse files
committed
Fixed flatten list.
1 parent c550c9b commit 01dbb1d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

isearch-project.el

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@
7373

7474
;;; Util
7575

76-
(defun isearch-project--flatten-list (l)
77-
"Flatten the multiple dimensional array, L to one dimensonal array.
78-
For instance,
79-
'(1 2 3 4 (5 6 7 8)) => '(1 2 3 4 5 6 7 8)."
80-
(cond ((null l) nil)
81-
((atom l) (list l))
82-
(t (loop for a in l appending (isearch-project--flatten-list a)))))
76+
(defun isearch-project--flatten-list (lst)
77+
"Flatten the multiple dimensional array, LST to one dimensonal array.
78+
For instance, '(1 2 3 4 (5 6 7 8)) => '(1 2 3 4 5 6 7 8)."
79+
(cond
80+
((null lst) nil)
81+
((atom lst) (list lst))
82+
(t (append (isearch-project--flatten-list (car lst)) (isearch-project--flatten-list (cdr lst))))))
8383

8484
(defun isearch-project--is-contain-list-string (in-list in-str)
8585
"Check if IN-STR contain in any string in the IN-LIST."

0 commit comments

Comments
 (0)