~ruther/guix-local

e767752c79975d30341f71d7f9de88edeb192d59 — Alex Kost 10 years ago ad0f31f
emacs: Add 'guix-any'.

* emacs/guix-utils.el (guix-any): New function.
1 files changed, 8 insertions(+), 0 deletions(-)

M emacs/guix-utils.el
M emacs/guix-utils.el => emacs/guix-utils.el +8 -0
@@ 215,6 215,14 @@ accessed with KEYS."
     (while (re-search-forward ,regexp nil t)
       ,@body)))

(defun guix-any (pred lst)
  "Test whether any element from LST satisfies PRED.
If so, return the return value from the successful PRED call.
Return nil otherwise."
  (when lst
    (or (funcall pred (car lst))
        (guix-any pred (cdr lst)))))


;;; Diff