aboutsummaryrefslogtreecommitdiffstats
path: root/l
diff options
context:
space:
mode:
authorTeddy Wing2021-01-30 16:37:25 +0100
committerTeddy Wing2021-01-30 16:37:25 +0100
commit8b0060a6b029eb5600abe0d8187c28d354dd7a33 (patch)
tree958c6dc9f105709457ee657a94a070c521ef6cdb /l
parente6bb0f67f5c16543ca84e3114e21ad4706bc78f0 (diff)
downloadextreload-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.
Diffstat (limited to 'l')
-rw-r--r--l/src/main.lisp7
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))