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

MattCoder mattcoder at hotmail.com
Fri Jun 28 13:02:35 PDT 2013


On Friday, 28 June 2013 at 19:43:37 UTC, Simen Kjaeraas wrote:
> import std.stdio;
> import std.typecons : tuple;
>
> auto foo(int x, int y){
> 	writeln(x, y);
> 	return tuple(3, 4);
> }
>
> void main(){
> 	foo(foo(1,2).tupleof);
> }

Hi Simen,

Thanks for your help too, it worked!


More information about the Digitalmars-d-learn mailing list