def index(idx, inp): idx = dynamic_cast(T_INT, idx).value try: return T_STRING.create_from(inp[idx]).value except IndexError: panic("array index out of range")
def join(separator, inp): separator = dynamic_cast(T_STRING, separator).value vals = map(lambda x: T_STRING.create_from(x).value, inp) return separator.join(vals)