diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-03-01 15:44:40 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-03-01 15:44:40 +0100 |
commit | 36d7c93119d84eb4b2949ebbab1b19941c4049d1 (patch) | |
tree | a2492735157b659f201c3d253b9a6e679175bbad | |
parent | 5ddd4b97a50a0faaf70509b37d8e104f4504be09 (diff) | |
download | cuirass-36d7c93119d84eb4b2949ebbab1b19941c4049d1.tar cuirass-36d7c93119d84eb4b2949ebbab1b19941c4049d1.tar.gz |
database: Adjust style of 'assqx-ref'.
* src/cuirass/database.scm (db-get-builds)[assqx-ref]: Rewrite with
'match'.
-rw-r--r-- | src/cuirass/database.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm index 751b8ef..147028e 100644 --- a/src/cuirass/database.scm +++ b/src/cuirass/database.scm @@ -373,12 +373,13 @@ FILTERS is an assoc list which possible keys are 'project | 'jobset | 'job | ;; XXX Change caller and remove (define (assqx-ref filters key) - (if (null? filters) - #f - (match (car filters) - ((xkey xvalue) (if (eq? key xkey) - xvalue - (assqx-ref (cdr filters) key)))))) + (match filters + (() + #f) + (((xkey xvalue) rest ...) + (if (eq? key xkey) + xvalue + (assqx-ref rest key))))) (define (format-output name path) `(,name . ((#:path . ,path)))) |