Loop over multiple arrays simultaneously: Difference between revisions
Content added Content deleted
m (→{{header|Diego}}: added clump comment) |
m (→{{header|Diego}}: syntax) |
||
Line 1,111: | Line 1,111: | ||
=={{header|Diego}}== |
=={{header|Diego}}== |
||
<lang diego> |
<lang diego>set_namespace(rosettacode); |
||
add_mat(myMatrix)_row(a,b,c)_row(A,B,C)_row(1,2,3); |
add_mat(myMatrix)_row(a,b,c)_row(A,B,C)_row(1,2,3); |
||
Line 1,125: | Line 1,125: | ||
Diego has no issue when arrays are of a different length, the "missing" array entries will be handled as empty. Note, the <code>matrix</code> will become a <code>clump</code>, but can still be treated as a <code>matrix</code>. |
Diego has no issue when arrays are of a different length, the "missing" array entries will be handled as empty. Note, the <code>matrix</code> will become a <code>clump</code>, but can still be treated as a <code>matrix</code>. |
||
<lang diego> |
<lang diego>set_ns(rosettacode); |
||
add_clump(myClump)_row(a,b,c,d)_row(A,B,C,D,E,F)_row(-1,0,1,2,3); // The default spread is presumed to be 'origin' |
add_clump(myClump)_row(a,b,c,d)_row(A,B,C,D,E,F)_row(-1,0,1,2,3); // The default spread is presumed to be 'origin' |