diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-12-12 11:42:12 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-12-12 11:48:46 +0100 |
commit | e82e55e58c67b0215e768c4612ca542bc670f633 (patch) | |
tree | 856c4512fa1fbde59c1d9845c5a763ef8c4a14b4 /emacs/guix-utils.el | |
parent | 98bd851ee891ca4a84e061fe1e78ba78c292b096 (diff) | |
parent | e35dff973375266db253747140ddf25084ecddc2 (diff) | |
download | guix-e82e55e58c67b0215e768c4612ca542bc670f633.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'emacs/guix-utils.el')
-rw-r--r-- | emacs/guix-utils.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el index d1f088b6a8..5f3f3ecc10 100644 --- a/emacs/guix-utils.el +++ b/emacs/guix-utils.el @@ -226,6 +226,17 @@ single argument." (while (re-search-forward ,regexp nil t) ,@body))) +(defun guix-modify (object modifiers) + "Apply MODIFIERS to OBJECT. +OBJECT is passed as an argument to the first function from +MODIFIERS list, the returned result is passed to the second +function from the list and so on. Return result of the last +modifier call." + (if (null modifiers) + object + (guix-modify (funcall (car modifiers) object) + (cdr modifiers)))) + ;;; Alist accessors |