On Wed, Dec 21, 2022 at 04:49:09PM +0100, Sascha Ziemann wrote: > > Is that related to "shared arrays"? This seems to be even more general (the > > affine part being the offset of the slice). > > Thanks for the hint. I was not aware of them. > > But I am struggling to use them. This does not work: > > (define str "Hello, World!") > (define bv (string->utf8 str)) > (define sa (make-shared-array bv (lambda (i) (list (+ i 7))) '(0 4)))
I think this should be (define sa (make-shared-array bv (lambda (i) (list (+ i 7))) 4)) since you have a one-dimensional vector. But perhaps I mis-read your intentions. Cheers -- t
signature.asc
Description: PGP signature