[plt-scheme] srfi/42 filter doen't work

From: Jens Axel Soegaard (jensaxel at soegaard.net)
Date: Wed Oct 29 06:08:48 EDT 2008

Serge Dukhopel skrev:
> Hi, I'm trying to use srfi/42 and found a problem. Following code
> (it's actually one of the test cases from srfi/42ref/examples-42.ss)
>
> #lang scheme
> (require srfi/42)
> (list-ec (:range n 5) (if (even? n)) (:range k (+ n 1)) (list n k))
>   
I can confirm this is a bug. The underlying cause is that the if in the 
mzscheme language
is different from the if in the scheme language.


To try the example either replace #lang scheme with #lang mzscheme or
run this snippet in the Pretty Big Language:

  (require srfi/42)
  (list-ec (:range n 5) (if (even? n)) (:range k (+ n 1)) (list n k))

I'll try to figure out how to fix the problem, but I fear it is a bit 
involved
to change the code to allow both if-bindings.  Unless  there  someone
knows a trick...

-- 
Jens Axel Søgaard



Posted on the users mailing list.