frroossst / gsuneido

Go implementation of Suneido
MIT License
0 stars 0 forks source link

multiple return values/ destructure on return #14

Open frroossst opened 1 year ago

frroossst commented 1 year ago
foo = function() {
    return #(flag: false, val: 123)

fg, vl = foo()
Print(fg) // false
Print(vl) // 123
frroossst commented 1 year ago
foo = function() {
    return Object(1, 2, 3) 

a, b, c = foo()
Print(a) // 1
Print(b) // 2
Print(c) // 3
frroossst commented 1 year ago

start with multiple assignment

a, b, c = 1, 2, 3