In progress.
_
1
[]
x
...x
(named pattern) = value
x: _
x: 1
x: a
x: (a, 2)
Combine, mix match at assignment sites:
let a, b = 1, 2 let (c, ...d, e) = 1, 2, 3, 4 , 5 a, b = b, a
They are also the core behind function patterns. (Multimethods coming soon)
def function(x, ...y, z = 5) { println "$x $y $z" }
There was an error while loading. Please reload this page.