Closed akleemans closed 5 months ago
You cannot unpack lists in Codon, unfortunately, as list length is not known at compile time; you can only unpack tuples. You need to either cast list to tuple or have an arbitrary way to pass lists to functions.
This limitation won't go away; it is intrinsic to Codon's static compilation approach.
Somehow argument unpacking does not work:
Error:
error: argument after * must be a tuple, not 'List[int]'
(Codon version 0.16.3)Is there any way to do this?
For the
print()
-case above I could find a workaround, but if I want to use e.g.math.lcm(*integers)
with a list of variable length, I see no possible solution.