我发现自己一直在做这种事情。我一直在考虑编写一个宏/函数来使这种事情变得更容易,但我突然想到我可能正在重新发明轮子。
是否有一个现有的功能可以让我更简洁地完成同样的事情?
(defun remove-low-words (word-list)
"Return a list with words of insufficient score removed."
(let ((result nil))
(dolist (word word-list)
(when (good-enough-score-p word) (push word result)))
result))