Skip to content

Syntax Proposals / Iterating on multiple arrays at once

Two proposals:

  • a >= x[i][j] for i,j in zip([0:2],[0:2]); (introduces the concept of "extraction" + a function) or a >= x[i][j] for {i,j} in zip([0:2],[0:2]); to make the extraction explicit
  • a >= x[i][j] for i,j in [0:2],[0:2]; which is more of a syntaxic sugar.

both are solved to

a >= x[0][0]
a >= x[1][1]
a >= x[2][2]
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information