For the record, the following worked (in Chicken 2.6):
(require-extension syntax-case srfi-4)
(import srfi-4-comprehensions)
(f64vector-ec (nested (:range i 1 4) (:range j 1 4))
(cond ((fx< i j) 0.0) ((fx= i j) 1.0) (else 2.0)))
Thanks a lot, Felix.
"felix winkelmann" <[EMAIL PROTECTED]> writes:
> On 3/16/07, Ivan Raikov <[EMAIL PROTECTED]> wrote:
>>
>> Has anybody used the srfi-4-comprehensions egg recently? I get this:
>>
>> csi> (require-extension syntax-case srfi-4 srfi-4-comprehensions srfi-42)
>>
>> csi> (vector-ec (nested (:range i 1 4) (:range j 1 4))
>> (cond ((fx< i j) 0.0) ((fx= i j) 1.0) (else 2.0)))
>>
>> #(1.0 0.0 0.0 2.0 1.0 0.0 2.0 2.0 1.0)
>>
>> csi> (f64vector-ec (nested (:range i 1 4) (:range j 1 4))
>> (cond ((fx< i j) 0.0) ((fx= i j) 1.0) (else 2.0)))
>>
>> Error: invalid syntax: (:do i (let ((b 4)) (if (not (##core#check (and
>> (integer? b) (exact? b)))) (error "arguments of :range are not exact
>> integer " "(use :real-range?)" 0 b 1))) ((1 0)) (< 1 b) (let ()) #t
>> ((+ 1 1)))
>>
>
> Try:
>
> (import srfi-4-comprehensions)
>
> cheers,
> felix
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users