Francois Maltey <[EMAIL PROTECTED]> writes: > > L := concat [concat [concat [[[a,b,c,d] _ > > for a in 1..9] _ > > for b in 1..9] _ > > for c in 1..9] _ > > for d in 1..9] > > > > and then loop over them: > > > > [eval(matrix [[a,b,15-a-b],[c,d,15-c-d],[15-a-c,15-b-d,15-a-d]], [a,b,c,d], > > l) for l in L] > > I ignore this way. It's better than this too long command line map : > map (l +-> matrix [[l.1,l.2,15-l.1-l.2],[...],[...]], L) > > In mupad there is the short-cut > map ([a,b,c,d] -> matrix [[a,b,15-a-b],[c,d,15-c-d],[15-a-c,15-b-d,15-a-d]], > L)
yes, I'd love to have this, too. I think in aldor it should work. > The eval seems quite different : > the map doesn't create any symbolic matrix > but the eval create symbolic matrices. Am I right ? Well, not the eval, but matrix [[a,b,15-a-b],[c,d,15-c-d],[15-a-c,15-b-d,15-a-d]] which really results in the same problem, though. > But I take note that exercices for my students use a lot of cartesian > products with $...$... and very view train of for as above. Well, parallel iteration is not found in many languages, it is really a strenght of Axiom/Aldor. Martin _______________________________________________ Axiom-developer mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-developer
