aboutsummaryrefslogtreecommitdiff
path: root/examples/generif.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/generif.scm')
-rwxr-xr-xexamples/generif.scm26
1 files changed, 12 insertions, 14 deletions
diff --git a/examples/generif.scm b/examples/generif.scm
index 7a60214..909ec13 100755
--- a/examples/generif.scm
+++ b/examples/generif.scm
@@ -54,26 +54,24 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
("CAST(createtime AS CHAR)" EntryCreateTime)))))
(multiset dct:references
(map (lambda (pmid)
- (if (string-blank? pmid)
- ""
- (string->symbol
- (format #f "pubmed:~a" (string-trim-both pmid)))))
+ (match pmid
+ ((? string-blank? p) "")
+ (p (string->symbol
+ (format #f "pubmed:~a" (string-trim-both pmid))))))
(string-split (field GeneRIF PubMed_ID PMID)
#\space)))
(set foaf:mbox
- (let ((mbox (sanitize-rdf-string (field GeneRIF email))))
- (if (string-blank? mbox)
- ""
- (string->symbol
- (format #f "<~a>" mbox)))))
+ (match (sanitize-rdf-string (field GeneRIF email))
+ ((? string-blank? mbox) "")
+ (mbox (string->symbol
+ (format #f "<~a>" mbox)))))
(set dct:identifier (annotate-field (format #f "~s" (field GeneRIF Id))
'^^xsd:integer))
(set foaf:homepage
- (let ((homepage (sanitize-rdf-string (field GeneRIF weburl))))
- (if (string-blank? homepage)
- ""
- (string->symbol
- (format #f "<~a>" homepage)))))
+ (match (sanitize-rdf-string (field GeneRIF weburl))
+ ((? string-blank? homepage) "")
+ (homepage (string->symbol
+ (format #f "<~a>" homepage)))))
(set dct:hasVersion (annotate-field (format #f "~s" (field GeneRIF versionId))
'^^xsd:integer))
(set gnt:initial (sanitize-rdf-string (field GeneRIF initial)))