It would be nice if we could request type information from alucard terms in CL functions
(defun reshape (array new-element-type)
(with-requested-type array array-type
(match array-type
((array length type)
(coerce array
(array
(* length
(cl:- (element-size element-type) (element-size type)))
new-element-type)))))
with that this code can be made. Meaning that we can offer a more safe way to reshape an array form CL. rather than just doing the math in our head.
It would be nice if we could request type information from alucard terms in CL functions
with that this code can be made. Meaning that we can offer a more safe way to reshape an array form CL. rather than just doing the math in our head.