diff options
author | Teddy Wing | 2021-01-30 16:37:25 +0100 |
---|---|---|
committer | Teddy Wing | 2021-01-30 16:37:25 +0100 |
commit | 8b0060a6b029eb5600abe0d8187c28d354dd7a33 (patch) | |
tree | 958c6dc9f105709457ee657a94a070c521ef6cdb | |
parent | e6bb0f67f5c16543ca84e3114e21ad4706bc78f0 (diff) | |
download | extreload-8b0060a6b029eb5600abe0d8187c28d354dd7a33.tar.bz2 |
main.lisp: Change `filter` to use `remove-if-not`
Just learned about `remove-if-not`. Really cleans up this function. Not
even really necessary to keep `filter`, but I guess I'll hold on to it
for now.
-rw-r--r-- | l/src/main.lisp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/l/src/main.lisp b/l/src/main.lisp index 0689107..a75fbc3 100644 --- a/l/src/main.lisp +++ b/l/src/main.lisp @@ -94,9 +94,4 @@ (filter #'extensionp targets))) (defun filter (predicate list-form) - (let ((newl '())) - (dolist (el list-form) - (if (funcall predicate el) - (push el newl))) - - newl)) + (remove-if-not predicate list-form)) |