arrays.lsp test-adjustable-array initial element
therik opened this issue · comments
Hi, I'm learning through those koans now and I found small mistake:
in test-adjutable-arrays, after the (adjust-array x '(3 4))
the last assert is testing for uninitialized element. According to hyperspecs, the behavior here is undefined, thus probably SBCL specific.
The array after adjusting is: #2A((5 5 0 0) (5 5 0 0) (0 0 0 0))
in SBCL, that's somewhat counter intuitive, I'd expect NIL
s, not zeroes. It would be nice to put either a comment stating it's SBCL-specific when reading uninitialised element, or perhaps add :initial-element
to that adjust-array
.
Cheers.
+1. GNU CLISP (2.49) returns #2A((5 5 NIL NIL) (5 5 NIL NIL) (NIL NIL NIL NIL))
for this.
thx