From 9ab56bddd1c9fd086b3001995090f9686f4ab1c4 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Mon, 20 Aug 2012 21:01:06 -0400 Subject: [PATCH] Fixes to RENDER-BY-20. --- src/indices.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/indices.lisp b/src/indices.lisp index c83c317..fcc3712 100644 --- a/src/indices.lisp +++ b/src/indices.lisp @@ -43,11 +43,11 @@ "Render the indices to view posts in reverse chronological order by 20." (flet ((by-20 (posts start) (let ((index (* 20 (1- start)))) - (subseq posts index (min (length posts) (+ index 19)))))) + (subseq posts index (min (length posts) (+ index 20)))))) (let ((posts (sort *posts* #'string> :key #'post-date))) - (loop for i from 1 then (1+ i) - until (> (* (1- i) 20) (length posts)) - do (write-index (by-20 posts i) (format nil "~d.html" i) "Recent Posts"))))) + (loop for i = 1 then (1+ i) + do (write-index (by-20 posts i) (format nil "~d.html" i) "Recent Posts") + until (> (* i 20) (length posts)))))) (defun render-by-tag () "Render the indices to view posts by tag."