I am trying to do a simple for loop in main! how ever, seems that .iter is not resolved only when I try to iterate a list in main. The following fails with:a
MISSING METHOD
This iter method is being called on a value whose type doesn't have that method.
The value's type is:
List(Builtin.Num.Dec)
main! = |_args| {
for x in [1, 2, 3] {
echo!(x.to_str())
}
Ok({})
}
doing the same for loop in any other function and calling that function from main seems to work. Is there a restriction on using for loops in main?
Sorry, wasn't using latest nightly
Andres Villegas has marked this topic as resolved.
Last updated: Jul 23 2026 at 13:15 UTC