From 6453e881ad42c0bfde1a18fd388500986d10cd59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 25 Oct 2016 18:06:13 +0200 Subject: website: download: Use 'match'. * website/www/download.scm (download-box): Use 'match-lambda' when traversing FILES. --- website/www/download.scm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/website/www/download.scm b/website/www/download.scm index 57aaffb..e8c58ef 100644 --- a/website/www/download.scm +++ b/website/www/download.scm @@ -22,6 +22,7 @@ (define-module (www download) #:use-module (www utils) #:use-module (www shared) + #:use-module (ice-9 match) #:export (download-page)) (define %usb-image-description @@ -78,16 +79,18 @@ dependencies.") (h2 ,title) (p ,description) (p "Download options:") - ,(map (lambda (file) - `(a (@ (href ,(cdr file)) (class "hlink-download")) - ,file)) + ,(map (match-lambda + ((title . url) + `(a (@ (href ,url) (class "hlink-download")) + ,title))) files) (p "Signatures: " - ,(map (lambda (file) - `(a (@ (href ,(string-append (cdr file) ".sig")) - (class "hlink-signature")) - ,(string-append (car file)))) - files)) + ,(map (match-lambda + ((title . url) + `(a (@ (href ,(string-append url ".sig")) + (class "hlink-signature")) + ,title))) + files)) (p (a (@ (href ,(guix-url manual))) "Installation instructions") "."))) -- cgit v1.2.3