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

Tuple #37

Closed
MoSonLee opened this issue Aug 16, 2022 · 0 comments
Closed

Tuple #37

MoSonLee opened this issue Aug 16, 2022 · 0 comments

Comments

@MoSonLee
Copy link
Owner

  • 여러가지 type들을 한꺼번에 묶어서 사용할 수 있는 struct(구조체)
  • tuple의 원소들은 서로 다른 타입일 수 있기에 Collection Type으로 취급되지는 않는다.
    image
  • 출력값: ("1", true, 50)
  • tupple은 String, Int 등등 named Type만 담을 수 있는 것이 아닌 compound, tuple, function type들을 모두 넣을 수 있다.
    image
  • tuple안에 tuple을 넣고 출력한값: (("1", true, 50), true)
    image
  • func을 tuple에 넣고 출력 -> 출력값: (1, "2", true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant