Unverified Commit de0d3feb authored by Philip Kaludercic's avatar Philip Kaludercic 🌝
Browse files

fixed empty page bug

parent 5b5a94c9
...@@ -19,10 +19,12 @@ See (haunt builder blog)'s blog for more details." ...@@ -19,10 +19,12 @@ See (haunt builder blog)'s blog for more details."
(else (shorter-than (cdr lst) (1- n))))) (else (shorter-than (cdr lst) (1- n)))))
(define (group-by lst n) (define (group-by lst n)
(if (shorter-than lst n) (cond ((null? lst) '())
(list lst) ((shorter-than lst n)
(receive (head rest) (split-at lst n) (list lst))
(cons head (group-by rest n))))) (else
(receive (head rest) (split-at lst n)
(cons head (group-by rest n))))))
(lambda (site posts) (lambda (site posts)
(let* ((sorted (posts/reverse-chronological posts)) (let* ((sorted (posts/reverse-chronological posts))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment