Skip to content

Slight issue in book (Compound Data Types section) #21829

Description

@budleigh

In one of the tuple examples in the compound data types section (beginner), the docs show that

let x = (1, 2, 3);
let y = (2, 2, 4);

are not equivalent tuples by saying the following:

This will print no, because some of the values aren't equal.

To me, this implies that the following WOULD be equivalent:

let x = (1, 2, 3);
let y = (2, 1, 3);

because all of the values are the same, but the compiler says the tuples are different. Perhaps add a note about value ordering being important to tuple equivalency or show another example.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions