Comment

Comment by nercht12

x = foo()

bar(x.a: x.b:)

Functions can return data. So say, a=5, then to get the value of 5 out, all you have to do is call the function a.

Edit: I'm assuming foo() here returns an object with members "a" and "b". An example of such a function-object would be:

foo = [] { ret( [a=5, b=10] ) }

parent nercht12 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton