Can we implement range type (a...b) wherer b is a variable
wmanshu opened this issue · 1 comments
wmanshu commented
Currently, in the for loop, the Flint does not support ranges like (0..<n)
where n is a local variable as n is not an expected literal here.
An example that this implementation is required.
func checkAccuracyRate(output: [String]) -> Int
{
assert(assignmentComplete)
var score: Int = 0
for i: Int in (0..<output.length) {
if output[i] == correctOutput[i] {
score += 1
}
}
return score
}