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

Visualization of key/value pair fields #17

Open
dwhatley19 opened this issue Aug 4, 2020 · 2 comments
Open

Visualization of key/value pair fields #17

dwhatley19 opened this issue Aug 4, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@dwhatley19
Copy link
Contributor

Reading 2 has a diagram illustrating the usage of "key/value pair" field types:
Screen Shot 2020-08-04 at 11 59 20 AM

The proposed Snapdown syntax for this diagram is:

turtles -> (Map<String,Turtle> (String "Buster") = (Turtle), (String "Buckminster") = (Turtle), (String "Bob") = (Turtle))

Alternatively, one can write:

#1 -> (Turtle)
#2 -> (Turtle)
#3 -> (Turtle)
turtles -> (Map<String,Turtle> (String "Buster") = #1, (String "Buckminster") = #2, (String "Bob") = #3)
@dwhatley19
Copy link
Contributor Author

Simple cases (e.g. above diagram) are resolved. More complicated cases, as in the diagram in the answer explanation of
http://web.mit.edu/6.031/www/sp20/classes/02-basic-java/#@ex-java_collections-x_marks_the_spot

still need proposed syntax and layout.

@dwhatley19
Copy link
Contributor Author

Syntax has been revised to:

turtles -> (Map<String,Turtle>
  (String "Buster"): (Turtle),
  (String "Buckminster"): (Turtle)
  (String "Bob"): (Turtle))

@dwhatley19 dwhatley19 added the enhancement New feature or request label May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant