3 ms·
Interesting. I've encountered errors in a similar vein, which in retrospect must have been caused by using an anonymous list in a similar way to your example:
by timknauf 18y ago
Interesting. I've encountered errors in a similar vein, which in retrospect must have been caused by using an anonymous list in a similar way to your example:
[f1, f2][intIndex]()
The 'solution' seems to be something like
var functions = [f1, f2]
functions[intIndex]()
but that's a big loss for conciseness.
- lacker 18y agoThe most convenient solution is just using a semicolon. If the line continuation rules were the Python ones, this would "just work"....