Rename #'vectorise to #'build-vector.

This follows the naming scheme of #'build-list.
This commit is contained in:
Kyle 2015-08-29 18:48:43 -07:00
parent e7f2bf5bc1
commit 7e22c46e43
2 changed files with 7 additions and 7 deletions

View File

@ -141,12 +141,12 @@ produces '((a 1) (b 2) (c 3))."
(defmacro mapv (fn &rest vecs)
"Utility to map @c(fn) over the vectors @c(vecs), producing a vector."
`(map 'vector ,fn ,@vecs))
(defun vectorise (lst)
"Ensure @c(lst) is a vector."
(cond ((listp lst) (apply #'vector lst))
((vectorp lst) lst)
(otherwise (mapv #'identity lst))))
(defun build-vector (arg)
"If @c(arg) is an atom, create a vector for it."
(cond ((listp arg) (apply #'vector arg))
((vectorp arg) arg)
(otherwise (mapv #'identity arg))))
(defmacro assoc-val (item alist &rest key-args)
"Return the value of @c(item) in @c(alist). @c(key-args) should

View File

@ -25,7 +25,7 @@
#:zip
#:new-vector
#:mapv
#:vectorise
#:build-vector
#:assoc-val
;; kutils-hash-tables.lisp