[Question] Could a function return a list of arguments to call another function?

David d at dav1d.de
Fri Jun 28 14:04:17 PDT 2013


> However, they can return std.typecons.Tuple, so you could do this:
> 
> auto foo(int i, int j) {
>     writeln(i, " ", j);
>     return tuple(3,4);
> }
> void main() {
>     foo(foo(1,2).field);
> }
> 

"field" is deprecated in favor of "expand"


More information about the Digitalmars-d-learn mailing list