Hacker News new | ask | show | jobs
by maxnoe 2180 days ago
Yes, that it is pretty much already part of the language like this.

This works:

a, *b = (1, 2, 3, 4)

b will be [2, 3, 4]

1 comments

Not only that, but this also works!

    a, *b, c = (1, 2, 3, 4)
    a == 1, b == [2, 3], c == 4