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 ()
|
||||
"Retrieve a list of all tags used in posts."
|
||||
(sort (reduce (lambda (x y) (union x y :test #'string=))
|
||||
(mapcar #'post-tags (hash-table-values *posts*)))
|
||||
#'string<))
|
||||
(sort (remove-duplicates (mappend 'post-tags (hash-table-values *posts*))
|
||||
:test #'string=) #'string<))
|
||||
|
||||
(defun get-month (timestamp)
|
||||
"Extract the YYYY-MM portion of TIMESTAMP."
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
(:documentation "Homepage: <a href=\"http://github.com/redline6561/coleslaw\">Github</a>")
|
||||
(:use :cl)
|
||||
(:import-from :alexandria #:hash-table-values
|
||||
#:make-keyword)
|
||||
#:make-keyword
|
||||
#:mappend)
|
||||
(:import-from :closure-template #:compile-template)
|
||||
(:export #:main
|
||||
#:add-injection
|
||||
|
|
Loading…
Add table
Reference in a new issue