[racket] circular lists are not lists or sequences
I have some code that's been broken somewhere between 5.1.1 and git
HEAD. The issue seems to be either that circular lists no longer are
considered lists by `list?', or `in-list' has added a `list?' check (and
circular lists were never `list?').
In any case, these are the kinds of things I would expect to work, but
don't. Is this a bug?
> (for/first ([y (shared ((x (cons 1 x))) x)]) y)
for: expected a sequence for y, got something else: #0='(1 . #0#)
context...:
/Users/dvanhorn/Documents/git/racket/collects/racket/private/for.rkt:451:2:
make-sequence
/Users/dvanhorn/Documents/git/racket/collects/racket/private/misc.rkt:87:7
> (for/first ([y (in-list (shared ((x (cons 1 x))) x))]) y)
in-list: contract violation
expected: list?
given: #0='(1 . #0#)
context...:
/Users/dvanhorn/Documents/git/racket/collects/racket/private/for.rkt:551:2:
in-list
/Users/dvanhorn/Documents/git/racket/collects/racket/private/misc.rkt:87:7
Thanks,
David