diff options
Diffstat (limited to 'users')
-rw-r--r-- | users/wpcarro/emacs/pkgs/list/list.el | 2 | ||||
-rw-r--r-- | users/wpcarro/emacs/pkgs/list/tests.el | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/users/wpcarro/emacs/pkgs/list/list.el b/users/wpcarro/emacs/pkgs/list/list.el index 3196d85856c1..6747257d98d8 100644 --- a/users/wpcarro/emacs/pkgs/list/list.el +++ b/users/wpcarro/emacs/pkgs/list/list.el @@ -44,7 +44,7 @@ (defun list-concat (&rest lists) "Joins `LISTS' into on list." - (apply #'-concat lists)) + (apply #'append lists)) (defun list-duplicate (n x) "Duplicates the given element, X, N times in a list." diff --git a/users/wpcarro/emacs/pkgs/list/tests.el b/users/wpcarro/emacs/pkgs/list/tests.el index 4ee03c6b9792..4b4579688331 100644 --- a/users/wpcarro/emacs/pkgs/list/tests.el +++ b/users/wpcarro/emacs/pkgs/list/tests.el @@ -97,6 +97,10 @@ (should (equal '(a b c) (list-delete 'b '(a b b c)))) (should (equal '() (list-delete 'b '())))) +(ert-deftest list-concat () + (should (equal '(1 2 3 4 5) (list-concat '(1) '(2 3) '(4 5)))) + (should (equal '(1 2 3) (list-concat '() '(1 2 3))))) + ;; TODO(wpcarro): Supoprt this. ;; (ert-deftest list-zip () ;; (should (equal '((1 3 5) (2 4 6)) (list-zip '(1 2) '(3 4) '(5 6)))) |