Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clojure Idiom - tuple #421

Open
practicalli-johnny opened this issue Jun 14, 2022 · 0 comments
Open

Clojure Idiom - tuple #421

practicalli-johnny opened this issue Jun 14, 2022 · 0 comments

Comments

@practicalli-johnny
Copy link
Contributor

practicalli-johnny commented Jun 14, 2022

A Tuple in Clojure is a very simple data structure, usually represented as two related values in a vector

[value1 value2]

The value of a tuple is in its simplicity, although greater responsibility is required to use the tuple values in the desired way.

The tuple provides less structure and meaning than a hash-map, as the values in the tuple have no explicit key (although the first value could be perceived as the key, but then a hash-map representation would feel more appropriate)

Review Clojure Design Club discussions on tuples for more examples of how they are used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant