From: Martin C. <cra...@co...> - 2010-03-25 20:28:42
|
Sidney Markowitz wrote on Fri, Mar 26, 2010 at 07:58:38AM +1300: > Martin Cracauer wrote, On 26/03/10 7:40 AM: > > (defun testme (foo size) > > (loop with first = (when foo > > foo) > > for index from 0 below size > > for blah = 1 then 2 > > for meh across foo ;; << type error here > > do (print (list first index meh)))) > > The value of foo can't change. Is there a way to not have to test the > type of foo for compatibility with the "across" multiple times inside of > the inner loop without running into this problem? I'm not sure I parsed that completely. Could you clarify? The above is my simplified version of production code. "foo" and "size" come in from statements before this loop in the same defun The original looks like this: (defun some-defun () ;; come up with foo and size [...] ;; (loop with first = (when foo (some-function (some-struct-accessor (svref foo 0)))) for index from 0 below size for somecount = 1 then 2 for leg across foo [couple more for not using the same variables] do > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Sbcl-devel mailing list > Sbc...@li... > https://lists.sourceforge.net/lists/listinfo/sbcl-devel -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer <cra...@co...> http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/ |