Local def works
main =
nums = [1, 2]
[a, b] = nums
Task.ok {}
but top level def won't
9│ nums = [1, 2]
10│
11│ main =
12│ [a, b] = nums # not working
^
I have no specific suggestion for this operator, see TODO for the full
list of operators in Roc.
Can you file an issue?
Added another pair of success / fail cases. Filed https://github.com/roc-lang/roc/issues/6265
Steven Chen has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC