[iterate-devel] defclause-driver with &sequence

Venkatesan S svtesan at gmail.com
Sun Jan 23 23:56:06 UTC 2011


Thanks!! It works fine <sheepish grin>

On Mon, Jan 24, 2011 at 12:40 AM, Olof-Joachim Frahm <Olof.Frahm at web.de>wrote:

> Venkatesan S <svtesan at gmail.com> writes:
>
> > I want to use defclause-driver with the sequence keywords, I could not
> > figure out how to get the values passed in from, to and other such
> > clauses. Can anyone please provide some pointers?
>
> Hi, you were just a tiny step from the working solution:  With
>
> >        (with ,myfrm = ,iterate::from)
>
> , that is, using the qualified FROM from the iterate package, it works
> just fine.  You can also see this, if you macroexpand your
> IN-WHOLE-VECTOR definition:
>
> > (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
> >   (DEFMACRO CLAUSE-FOR-IN-WHOLE-VECTOR-5
> >             (&KEY ((:FOR VAR)) ((:IN-WHOLE-VECTOR V)) ((:FROM
> ITERATE::FROM))
> >              ((:UPFROM ITERATE::UPFROM)) ((:DOWNFROM ITERATE::DOWNFROM))
> >              ((:TO ITERATE::TO)) ((:DOWNTO ITERATE::DOWNTO))
> >              ((:ABOVE ITERATE::ABOVE)) ((:BELOW ITERATE::BELOW))
> >              ((:BY ITERATE::BY) 1) ((:WITH-INDEX ITERATE::WITH-INDEX))
> >              GENERATE)
> >     "All the elements of a vector (disregards fill-pointer)"
> > ...
>
> Since all those extra symbols are not exported from the iterate package,
> you've got to use them explicitely.
>
> Hth and cheers,
> Olof
>
> --
> The world is burning.  Run.
>
> _______________________________________________
> iterate-devel site list
> iterate-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/iterate-devel
>



-- 
Audentis fortuna juvat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/iterate-devel/attachments/20110124/bf826d6b/attachment.html>


More information about the iterate-devel mailing list