[racket] sequence-filter of in-port
5.2.
Looks like it has been fixed. Thanks for checking.
RAC
On Jul 22, 2012, at 10:57 AM, Adolfo Pérez Álvarez <adolfo.pa at gmail.com> wrote:
> Hi Richard,
>
> What version of Racket are you using? I've tested your code with
> 5.3.0.16 and it worked as expected, returning '() in both cases.
>
> 2012/7/22 Richard Cleis <rcleis at me.com>:
>> I was attempting to use sequence-filter and in-port to filter large files into small lists, but the following error occurs on the occasion that everything is filtered:
>>
>> apply: expects type <proper list> as 2nd argument, given: #f; other arguments were: #<procedure:might-filter-all>
>>
>> ;; equivalent arbitrary examples (I think)
>>
>> (define (might-filter-all x) (= x 99)) ; both cases below return '(3), if 99 is changed to 3
>>
>> (sequence->list (sequence-filter might-filter-all (in-range 3 4))) ; returns '()
>> (sequence->list (sequence-filter might-filter-all (in-port read (open-input-string "3")))) ; an error
>>
>> I could not find in-port in sequence.rkt, so I did not read it.
>>
>> Should the in-port sequence be different?
>>
>> rac
>>
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users