[iterate-devel] defclause-driver with &sequence
Olof-Joachim Frahm
Olof.Frahm at web.de
Sun Jan 23 16:40:34 UTC 2011
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.
More information about the iterate-devel
mailing list