numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
197 stars 118 forks source link

When a constant is used as the bound name for a `for: of:` comprehension, the constant's value is used #1089

Closed christianp closed 4 months ago

christianp commented 4 months ago

In a map call, you can use a name that is defined as a constant in the outer scope: map(2i, i, 1..3) = [2,4,6].

The for: operator doesn't do this: 2i for: i of: 1..3 = [i, i, i]. But it should.