<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On 24 Oct 2019, at 14:06, Steven Nunez <<a href="mailto:steve_nunez@yahoo.com" class="">steve_nunez@yahoo.com</a>> wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">(deftype simple-double-float-vector (&optional (length '*))</span><br style="caret-color: rgb(0, 0, 0); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""> "Simple vector of double-float elements."</span><br style="caret-color: rgb(0, 0, 0); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""> `(simple-array double-float (,length)))</span></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">One trick you could do to make claims about types which should be checked fairly fast (but, don't do this in an inner loop), if you have a list of things all of which you want to be of some good type, is</div><div class=""><br class=""></div><div class="">(coerce list-of-things '(vector good-type))</div><div class=""><br class=""></div><div class="">And then write inner loops which assume suitable vectors of good-type objects.</div><div class=""><br class=""></div><div class="">This has one nice property and one nasty one. The nice property is that (coerce (coerce something a-type) a-type) only conses one instance of a-type, so you can write functions which take either lists of elements or things you've already turned into vectors.</div><div class=""><br class=""></div><div class="">The nasty property is that you have to be aware of upgraded-array-element-type and in particular it does not have to be the case that (coerce '(1 2 3) '(vector fixnum)) returns a vector of fixnums: it could easily return a vector of machine integers, which will be bigger than fixnums.</div><div class=""><br class=""></div><div class="">--tim</div></body></html>