Refactor ALL-TAGS to use mappend.
This commit is contained in:
parent
971b1aa151
commit
597080c161
2 changed files with 4 additions and 4 deletions
|
@ -21,9 +21,8 @@
|
||||||
|
|
||||||
(defun all-tags ()
|
(defun all-tags ()
|
||||||
"Retrieve a list of all tags used in posts."
|
"Retrieve a list of all tags used in posts."
|
||||||
(sort (reduce (lambda (x y) (union x y :test #'string=))
|
(sort (remove-duplicates (mappend 'post-tags (hash-table-values *posts*))
|
||||||
(mapcar #'post-tags (hash-table-values *posts*)))
|
:test #'string=) #'string<))
|
||||||
#'string<))
|
|
||||||
|
|
||||||
(defun get-month (timestamp)
|
(defun get-month (timestamp)
|
||||||
"Extract the YYYY-MM portion of TIMESTAMP."
|
"Extract the YYYY-MM portion of TIMESTAMP."
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
(:documentation "Homepage: <a href=\"http://github.com/redline6561/coleslaw\">Github</a>")
|
(:documentation "Homepage: <a href=\"http://github.com/redline6561/coleslaw\">Github</a>")
|
||||||
(:use :cl)
|
(:use :cl)
|
||||||
(:import-from :alexandria #:hash-table-values
|
(:import-from :alexandria #:hash-table-values
|
||||||
#:make-keyword)
|
#:make-keyword
|
||||||
|
#:mappend)
|
||||||
(:import-from :closure-template #:compile-template)
|
(:import-from :closure-template #:compile-template)
|
||||||
(:export #:main
|
(:export #:main
|
||||||
#:add-injection
|
#:add-injection
|
||||||
|
|
Loading…
Add table
Reference in a new issue