diff options
| author | Syndamia <kamen@syndamia.com> | 2022-12-05 21:25:50 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2022-12-05 21:25:50 +0200 |
| commit | 5d8fe8033f493c2df59f75ac862b725b8a244d78 (patch) | |
| tree | 1cb98547206880b5c106dfc46dbfed94ace3bf5d /src/collections.lisp | |
| parent | 71a75cd53090be3ec2704ad8d57d8a3b499a9c0c (diff) | |
| download | senzill-5d8fe8033f493c2df59f75ac862b725b8a244d78.tar senzill-5d8fe8033f493c2df59f75ac862b725b8a244d78.tar.gz senzill-5d8fe8033f493c2df59f75ac862b725b8a244d78.zip | |
[collection] Improved how pop-back works
Diffstat (limited to 'src/collections.lisp')
| -rw-r--r-- | src/collections.lisp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/collections.lisp b/src/collections.lisp index 4e7aae4..b0da74f 100644 --- a/src/collections.lisp +++ b/src/collections.lisp @@ -6,9 +6,9 @@ (defmacro pop-back (place) "Removes destructively last element and returns it" - `(progn (let ((val (car (last ,place)))) - (nbutlast ,place) - val))) + `(let ((val (car (last ,place)))) + (setq ,place (nbutlast ,place)) + val)) (defun slice (place &key (begin 0) (end (length place))) "Returns list of elements from begin to end indecies, inclusive" |
