diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-05-04 17:02:15 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-05-04 23:35:55 +0200 |
commit | 4b6fa8b33970be414ae035f63ed80b147dcd8200 (patch) | |
tree | c9dcfeff604fe3abd93a6f4566a08ec0129521da /guix | |
parent | 6aaf3ea62d883a717a3459b6c6da3c1cfede55e2 (diff) | |
download | gnu-guix-4b6fa8b33970be414ae035f63ed80b147dcd8200.tar gnu-guix-4b6fa8b33970be414ae035f63ed80b147dcd8200.tar.gz |
utils: Remove 'split'.
This procedure was redundant with SRFI-1's 'break'.
* guix/utils.scm (split): Remove.
* tests/utils.scm ("split, element is in list")
("split, element is not in list"): Remove.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/utils.scm | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 6c01edde21..725f4346c3 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -85,7 +85,6 @@ fold2 fold-tree fold-tree-leaves - split cache-directory readlink* edit-expression @@ -788,23 +787,6 @@ are connected to NODE in the tree, or '() or #f if NODE is a leaf node." (else result))) init children roots)) -(define (split lst e) - "Return two values, a list containing the elements of the list LST that -appear before the first occurence of the object E and a list containing the -elements after E." - (define (same? x) - (equal? e x)) - - (let loop ((rest lst) - (acc '())) - (match rest - (() - (values lst '())) - (((? same?) . tail) - (values (reverse acc) tail)) - ((head . tail) - (loop tail (cons head acc)))))) - (define (cache-directory) "Return the cache directory for Guix, by default ~/.cache/guix." (or (getenv "XDG_CONFIG_HOME") |