Is there possibility to use indexing directly on a function\'s return value? Something like this:
readStr()(2:5)
where readStr()
readStr()
No.
But if it bothers you, you can write your own user defined functions and operators to achieve a similar outcome without having to store the result of the function reference in a separate variable.