Joe,

How can you forget about sequences.product, which you yourself wrote :-)

USING: math.ranges sequences.product ;
5 [ 1 3 [a,b] ] replicate [ . ] product-each

Slava

On Fri, May 20, 2011 at 10:10 AM, Joe Groff <[email protected]> wrote:
> On May 20, 2011, at 9:45 AM, Zhe Hu wrote:
>
> Thanks a lot for the quick reply.
> Related to the earlier question. I'd like to do (pseudo-code):
> for a0 in range(a,b):
>    for a1 in range(a,b):
>      for a2 in range(a,b):
>         for a3 in range(a,b):
>            for a4 in range(a,b):
>                for a5 in range(a,b):
>                    f_function( a0, a1, a2, a3, a4, a5)
>
> Basically search over the range(a,b) of the parameters a0 ... a5 for the
> f_function
> I tried [     with each ] each with no success.
>
> Use locals.
> from to [a,b) :> range
> range [| a0 |
>     range [| a1 |
>         range [| a2 |
>             range [| a3 |
>                 range [| a4 |
>                     range [| a5 |
>                         a0 a1 a2 a3 a4 a5 f-function
> ] ] ] ] ] ]
> -Joe
> ------------------------------------------------------------------------------
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its
> next-generation tools to help Windows* and Linux* C/C++ and Fortran
> developers boost performance applications - including clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to