guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] New function array-mutable?


From: Maxime Devos
Subject: Re: [PATCH] New function array-mutable?
Date: Thu, 25 Nov 2021 18:19:53 +0000
User-agent: Evolution 3.38.3-1

lloda schreef op do 25-11-2021 om 17:40 [+0100]:
> [...]

Suggestion: add a few tests to test-suite/tests/arrays.test:

(pass-if-equal "new"
  #t
  (array-mutable? (make-array #f '(1 2) '(3 4))))

(pass-if-equal "empty (two-dimensional)"
  #t
  (array-mutable? (array-copy #1())))

(pass-if-equal "empty (two-dimensional)"
  #t
  (array-mutable? (array-copy #2(() ()))))

(pass-if-equal "immutable copy"
  #f
  (array-mutable? (immutable-array-copy #2((h) (h)))))

This requires a currently non-existent procedure ‘make-immutable-
array’, copying an array into a new immutable array.

Greetings,
Maxime




reply via email to

[Prev in Thread] Current Thread [Next in Thread]