Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions concepts/tuples/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ the second `Item2`, etc. Non-default names are discussed below.
vertices = (60, 60, 60);

// return value
(bool, int) GetSameOrBigger(int num1, int num2)
(int, int) SumAndProduct(int x, int y)
{
return (num1 == num2, num1 > num2 ? num1 : num2);
int sum = x + y;
int product = x * y;

// return a tuple with both values
return (sum, product);
Comment on lines +28 to +34
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer the tuple to return two different types.

BTW This content will like also be in the concept's about.md file

}

// method argument
Expand Down