Proposal for SRFI 231bis: Constructor for arrays where all elements have the same value John Cowan (12 Apr 2026 02:23 UTC)

Proposal for SRFI 231bis: Constructor for arrays where all elements have the same value John Cowan 12 Apr 2026 02:22 UTC

I'm not sure what to call such an array: a zero/null matrix is the
particular case where the number of dimensions is 2 and the value is
0. In CL you can create such an array with make-array by using the
keyword argument :initial-element, which is mutually exclusive with
providing a nested list with :initial-contents.

Since it is trivial to create a generalized array like this with
make-array by passing a getter like (lambda (x) <expr>), it should
return a mutable specialized array.