From 62a351d8d5c9bd28e2cb50e8ce1c34b67daa4981 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 26 Apr 2011 15:12:05 +0200 Subject: optimization for with=foo * tekuti/page.scm (page-feed-atom): Reduce "with=unknown" to nothing. --- tekuti/page.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tekuti/page.scm b/tekuti/page.scm index 182ea02..17cafa8 100644 --- a/tekuti/page.scm +++ b/tekuti/page.scm @@ -347,9 +347,11 @@ (if (pair? with) (fold (lambda (tag cont) (let ((posts (hash-ref tags tag '()))) - (lambda (post) - (or (member (post-key post) posts) - (cont post))))) + (if (pair? posts) + (lambda (post) + (or (member (post-key post) posts) + (cont post))) + cont))) (lambda (post) #f) with) (lambda (post) #t))) -- cgit v1.2.3-54-g00ecf