diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cuirass/utils.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cuirass/utils.scm b/src/cuirass/utils.scm index 1667c02..56b9c6a 100644 --- a/src/cuirass/utils.scm +++ b/src/cuirass/utils.scm @@ -20,7 +20,9 @@ (define-module (cuirass utils) #:use-module (ice-9 match) + #:use-module (srfi srfi-1) #:export (;; Procedures + alist? mkdir-p make-user-module ;; Macros. @@ -30,6 +32,11 @@ (define-syntax-rule (λ* formals body ...) (lambda* formals body ...)) +(define (alist? obj) + "Return #t if OBJ is an alist." + (and (list? obj) + (every pair? obj))) + (define mkdir-p (let ((not-slash (char-set-complement (char-set #\/)))) (λ* (dir #:optional mode) |