mirror of
https://github.com/Dummi26/mers.git
synced 2026-01-26 10:47:04 +01:00
added destructuring assignments for tuples (and lists on the left)
This commit is contained in:
12
examples/destructuring_assignment.mers
Normal file
12
examples/destructuring_assignment.mers
Normal file
@@ -0,0 +1,12 @@
|
||||
x := "https:\//www.google.com"
|
||||
|
||||
x.debug()
|
||||
|
||||
[a, [b, c]] := [1, ["str", 12.5]]
|
||||
|
||||
println("---")
|
||||
println(a.to_string() + " " + b + " " + c.to_string())
|
||||
println("~~~")
|
||||
|
||||
// switch! run_command("curl", [x, ...]) {
|
||||
// }
|
||||
Reference in New Issue
Block a user