
23 Apr
2007
23 Apr
'07
8:34 p.m.
Good day, perhaps the function below meets the Alexandria's standards for conservativeness/usefulness: (defun filter-if (fn &rest sequences) (labels ((iterate (acc sequences) (if (notany #'null sequences) (iterate (if-let ((testval (apply fn (mapcar #'car sequences)))) (cons testval acc) acc) (mapcar #'cdr sequences)) acc))) (nreverse (iterate nil sequences)))) The idea, but not the implementation, was taken from Paul Graham's book "On Lisp". Also, i cannot come up with a good docstring, so such one would be appreciated. regards, Samium Gromoff