Closed zxul767 closed 1 year ago
currently, access is achieved via:
var l = list() l.append(1) print l.at(0)
but given how common such an operation is, and that list is a primitive, we should support the following syntax as well:
list
print l[0]
where the index can, of course, be any valid expression that evaluates to an integer.
this is now in main.
main
currently, access is achieved via:
but given how common such an operation is, and that
list
is a primitive, we should support the following syntax as well:where the index can, of course, be any valid expression that evaluates to an integer.