Rename #'vectorise to #'build-vector.
This follows the naming scheme of #'build-list.
This commit is contained in:
parent
e7f2bf5bc1
commit
7e22c46e43
10
kutils.lisp
10
kutils.lisp
|
@ -142,11 +142,11 @@ produces '((a 1) (b 2) (c 3))."
|
||||||
"Utility to map @c(fn) over the vectors @c(vecs), producing a vector."
|
"Utility to map @c(fn) over the vectors @c(vecs), producing a vector."
|
||||||
`(map 'vector ,fn ,@vecs))
|
`(map 'vector ,fn ,@vecs))
|
||||||
|
|
||||||
(defun vectorise (lst)
|
(defun build-vector (arg)
|
||||||
"Ensure @c(lst) is a vector."
|
"If @c(arg) is an atom, create a vector for it."
|
||||||
(cond ((listp lst) (apply #'vector lst))
|
(cond ((listp arg) (apply #'vector arg))
|
||||||
((vectorp lst) lst)
|
((vectorp arg) arg)
|
||||||
(otherwise (mapv #'identity lst))))
|
(otherwise (mapv #'identity arg))))
|
||||||
|
|
||||||
(defmacro assoc-val (item alist &rest key-args)
|
(defmacro assoc-val (item alist &rest key-args)
|
||||||
"Return the value of @c(item) in @c(alist). @c(key-args) should
|
"Return the value of @c(item) in @c(alist). @c(key-args) should
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#:zip
|
#:zip
|
||||||
#:new-vector
|
#:new-vector
|
||||||
#:mapv
|
#:mapv
|
||||||
#:vectorise
|
#:build-vector
|
||||||
#:assoc-val
|
#:assoc-val
|
||||||
|
|
||||||
;; kutils-hash-tables.lisp
|
;; kutils-hash-tables.lisp
|
||||||
|
|
Loading…
Reference in New Issue