Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arrays.lsp test-adjustable-array initial element #37

Closed
therik opened this issue Nov 6, 2013 · 2 comments
Closed

arrays.lsp test-adjustable-array initial element #37

therik opened this issue Nov 6, 2013 · 2 comments

Comments

@therik
Copy link

therik commented Nov 6, 2013

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 NILs, 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.

@lesguillemets
Copy link

+1. GNU CLISP (2.49) returns #2A((5 5 NIL NIL) (5 5 NIL NIL) (NIL NIL NIL NIL)) for this.

@bileschi
Copy link
Member

bileschi commented Mar 5, 2014

thx

@bileschi bileschi closed this as completed Mar 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants