[iterate-devel] Problem with DEFCLAUSE-DRIVER

Marco Antoniotti antoniotti.marco at disco.unimib.it
Fri Mar 21 23:00:19 UTC 2008


Ok.

Yours works.  Why?  I fail to see the difference with mine.

Cheers

Marco


On Mar 21, 2008, at 19:46 , Chris Dean wrote:
>
> Marco Antoniotti <antoniotti.marco at disco.unimib.it> writes:
>> Well....  any suggestions?
>
> Here's some untested code, let me know if there are any problems with
> it:
>
>     (defmacro-driver (FOR var IN-ENUM e)
>       "All elements in the enum"
>       (let ((enum (gensym "ENUM-"))
>             (kwd (if generate 'generate 'for)))
>         `(progn
>            (with ,enum = ,e)
>            (,kwd ,var next (if (enum:has-more-elements-p ,enum)
>                                (enum:next ,enum)
>                                (terminate))))))
>
>     (iter (for x :in-enum (enum:range 3 8))
>           (collect (1+ x)))
>
>> Please note that the manual pages in HTML are not that useful.
>
> http://common-lisp.net/project/iterate/doc/Writing- 
> Drivers.html#Writing-Drivers
>
> works for me
>
> Cheers,
> Chris Dean

--
Marco Antoniotti, Associate Professor				tel.	+39 - 02 64 48 79 01
DISCo, Università Milano Bicocca U14 2043
Viale Sarca 336
I-20126 Milan (MI) ITALY

Please note that I am not checking my Spam-box anymore.








More information about the iterate-devel mailing list