Re: relationship to SRFI-25 Bradley Lucier 29 Sep 2015 06:03 UTC

On 09/28/2015 07:20 PM, Jamison Hope wrote:
't really understand this part.
> I'm not suggesting that array-map be implemented on top of array-ref,
> or that whatever other mutating functions there are be implemented
> on top of array-set! -- just that as an end user, having to extract
> and then invoke a closure rather than just calling a setter or getter
> *function* seems strange.


Often, there is only the getter function.  (I'm not sure what
distinction you're trying to make when you call it a "closure".)

I implement zero scalar fields over various domains as

(array domain (lambda (i j) 0.))

So one has only the getter function to work with, so if one wants to write

(array-ref a i j)

one actually needs to call ((array-getter a) i j)