[racket] Bug in srfi-42
Racket bug:
Welcome to Racket v6.1.1.
> (require srfi/42)
> (list-ec (: n 2 8) (if (odd? n)) n)
'(3 5 7)
> (first-ec #f (: n 2 8) (if (odd? n)) n)
stdin::80: :until: expected <generator> in
in: (if (odd? n))
context...:
C:\Program Files\Racket\share\pkgs\srfi-lib\srfi\42\expansion.scm:68:2: gener
ator->loop
C:\Program Files\Racket\share\pkgs\srfi-lib\srfi\42\expansion.scm:127:7
C:\Program Files\Racket\collects\racket\private\misc.rkt:87:7
The output should be
3
Gauche Scheme handles this correctly:
gosh> (use srfi-42)
#<undef>
gosh> (first-ec #f (: n 2 8) (if (odd? n)) n)
3