From 55477368f84f76b831d3b714c52784e7bb952021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 1 Feb 2022 21:32:15 +0100 Subject: Move path-append to own module. --- module/hnh/util.scm | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'module/hnh/util.scm') diff --git a/module/hnh/util.scm b/module/hnh/util.scm index 7fe44462..7fa3419d 100644 --- a/module/hnh/util.scm +++ b/module/hnh/util.scm @@ -556,26 +556,6 @@ -;; TODO shouldn't this use `file-name-separator-string'? -(define-public (path-append . strings) - (fold (lambda (s done) - (string-append - done - (if (string-null? s) - (string-append s "/") - (if (char=? #\/ (string-last done)) - (if (char=? #\/ (string-first s)) - (string-drop s 1) s) - (if (char=? #\/ (string-first s)) - s (string-append "/" s)))))) - (let ((s (car strings))) - (if (string-null? s) - "/" s)) - (cdr strings))) - - - - (define-syntax let-env (syntax-rules () [(_ ((name value) ...) -- cgit v1.2.3