<div dir="ltr"><div>Cool. Thanks all.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 26, 2021 at 2:18 PM <<a href="mailto:bil@ccrma.stanford.edu">bil@ccrma.stanford.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Here's one way to do that in scheme:<br>
<br>
(require mockery.scm)<br>
<br>
(define (meta-vector v data)<br>
(openlet<br>
(sublet (*mock-vector* 'mock-vector-class)<br>
'value v<br>
'mock-type 'mock-vector?<br>
'meta-data data)))<br>
<br>
(define v (meta-vector #(0 1 2) "hiho"))<br>
<br>
(display (v 1))<br>
1<br>
<br>
(display (v 'meta-data))<br>
hiho<br>
<br>
(display v)<br>
#(0 1 2)<br>
<br>
(vector? v)<br>
#t<br>
<br>
heh heh -- the last is a lie of course; it's actually<br>
a let trying to masquerade as a vector. mockery.scm<br>
defines several such "mock data" types.<br>
<br>
_______________________________________________<br>
Cmdist mailing list<br>
<a href="mailto:Cmdist@ccrma.stanford.edu" target="_blank">Cmdist@ccrma.stanford.edu</a><br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist" rel="noreferrer" target="_blank">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
</blockquote></div></div>