Idea: swap with multiple arguments

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon May 23 13:01:08 PDT 2016


So swap(a, b) swaps the contents of a and b. This could be easily 
generalized to multiple arguments such that swap(a1, a2, ..., an) 
arranges things such that a1 gets an, a2 gets a1, a3 gets a2, etc. I do 
know applications for three arguments. Thoughts? -- Andrei


More information about the Digitalmars-d mailing list