[gambit-list] ##subu8vector-move!
Marc Feeley
feeley at iro.umontreal.ca
Wed Sep 2 13:20:36 EDT 2009
On 2-Sep-09, at 11:43 AM, Alex Queiroz wrote:
> Hallo,
>
> I almost started coding something like ##subu8vector-move! when I
> found it in the source code. Is there any caveat with using it? It is
> not in the manual.
It does no type checking, so use at your own risk.
I could expose it and other procedures on the various vector types by
adding some type checking. Here are some procedures that could be
exposed:
> (define v (vector 1 2 3 4 5))
> (##append-vectors (list v v v))
#(1 2 3 4 5 1 2 3 4 5 1 2 3 4 5)
> (##subvector-fill! v 1 3 99)
> v
#(1 99 99 4 5)
> (##subvector-move! '#(a b c d e) 2 4 v 1)
> v
#(1 c d 4 5)
They are available for u8vectors, f64vectors, etc. (by replacing
"vector" by "u8vector", etc).
Here's the deal... I will expose them as soon as someone contributes
the corresponding documentation (for gambit-c.txi)!
Marc
More information about the Gambit-list
mailing list