I may be missing something, but I think this fails when it should yield a list. This expression makes racket enter an infinite loop, due to an apparent conflict between in-port and lexer:
Thank you for this explanation. I didn't understand the necessity to pass eof. I am folding over a sequence of tokens and I had trouble doing that with the parser-tools/yacc parser, so I cooked up something of my own.