https://toitlang.org/ logo
Can't call result of evaluating expression list[12...
# help
a
I have some basic code, simplified, it is as follows...
Copy code
constructor.fromList list/List:
    d := list[12:]
but I get the following error
Copy code
<pkg:..>: error: Can't call result of evaluating expression
    d := list[12:]
              ^~
Compilation failed
Error: exit status 1
As far as I can tell im following the docs per https://libs.toit.io/core/collections/class-List#operator%20%5B..%5D(2%2C0%2C0%2Cfrom%2Cto)
f
It's
d := list[12..]
The
12:
is interpreted as a call to
12
with the block
:
(empty block).
a
thats the one! 🤦
f
too much Go 😉
a
.. looks like : to me too 😛 I was staring at the docs and all! 😄
f
it has two dots 😉
a
indeed
maybe my head was a bit tilted
f
hehe