summaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-10-25 18:06:13 +0200
committerLudovic Courtès <ludo@gnu.org>2016-10-26 23:16:58 +0200
commit6453e881ad42c0bfde1a18fd388500986d10cd59 (patch)
treeb5fe3dac0ea45507ad20e70ba1a0798ec8fd5803 /website
parent580af4b3823357b04be87319975d9e3dab11b85a (diff)
downloadguix-artwork-6453e881ad42c0bfde1a18fd388500986d10cd59.tar
guix-artwork-6453e881ad42c0bfde1a18fd388500986d10cd59.tar.gz
website: download: Use 'match'.
* website/www/download.scm (download-box): Use 'match-lambda' when traversing FILES.
Diffstat (limited to 'website')
-rw-r--r--website/www/download.scm19
1 files 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")
".")))