with splats allowed in destructuring assignment

This commit is contained in:
Jeremy Ashkenas
2010-01-13 22:25:58 -05:00
parent 2d206e7b60
commit ed8a54995d
2 changed files with 27 additions and 4 deletions

View File

@@ -43,4 +43,20 @@ person: {
{name: a, family: {brother: {addresses: [one, {city: b}]}}}: person
print(a is "Bob")
print(b is "Moquasset NY, 10021")
print(b is "Moquasset NY, 10021")
test: {
person: {
address: [
"------"
"Street 101"
"Apt 101"
"City 101"
]
}
}
{person: {address: [ignore, addr...]}}: test
print(addr.join(', ') is "Street 101, Apt 101, City 101")