u8data set! - part-cw/lambdanative GitHub Wiki
(u8data-set! data idx val)
u8data-set! sets u8data value.
Parameter | Description |
---|---|
data | u8vector operated on |
idx | Index of the value to be replaced |
val | New value to be set |
Example
Example 1: Replace the 4th value of a u8data with 99
> (define mydata (u8vector->u8data (u8vector 1 4 9 16 25 36)))
> (u8data->u8vector mydata)
#u8(1 4 9 16 25 36)
> (u8data-set! mydata 4 99)
> (u8data->u8vector mydata)
#u8(1 4 9 16 99 36)