SigmundAI Copilot allows you to build and debug experiments with help from artificial intelligence. Install the Sigmund extension (public beta) and try it out now!
Iteradores estilo Python (pythonic)
La biblioteca pythonic
proporciona funciones similares a Python para iterar sobre matrices. Las funciones disponibles son: range()
, enumerate()
, items()
, zip()
, y zipLongest()
.
Ejemplo:
Dibuja una cuadrícula de cinco por cinco de números incrementales:
let positions = xy_grid(5, 50)
const cnv = Canvas()
for (const [i, [x, y]] of enumerate(positions)) {
cnv.text({text: i, x: x, y: y})
}
cnv.show()
Para obtener una descripción general, consulta: