yhara/biwascheme — Issue #28: 'list-ref' implementation bug
Author: rpdillon
Created: 2011-10-11 08:21:46+00:00
State: open

I think it affects more than just list-ref, but bounds checking is broken:

```
biwascheme> (list-ref (iota 9) 9)
[BUG] library function `list-ref' returned JavaScript's undefined
```

```
biwascheme> (list-ref (iota 9) 11)
d is undefined
```

In the most recent version, the error is the same, though the variable is named 'o' instead of 'd'. These interactions were taken from the interpreter on biwascheme.org.

It's pretty clear what's causing this in the implementation -- it's just a case of some edge cases slipping through the implementation (returning x.cdr without checking if it is defined, for example).