Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • $\begingroup$ Yes and yes. Even though I used myLabel = in reality it will become a data object $theData with a Head Association. Yes, at that point $theData will be <|"label" -> "myLabel"|>. , and myLabel === $theData will produce Yes. $\endgroup$ Commented May 13, 2024 at 20:17
  • $\begingroup$ Sorry, the Dollar makes the text italic, could don't figure out. the reason that I used myLabel on the left hand side of Set was misleading, it was just to indicate that the symbol on the left of Set will become the "label" in the data. $\endgroup$ Commented May 13, 2024 at 20:21
  • $\begingroup$ In the future myFunction will be overloaded with bunch of pattern matching to manipulate the DollarTheData to change some additional elements of the data specified by their own Key's $\endgroup$ Commented May 13, 2024 at 20:23
  • $\begingroup$ Okay, so next question. Why do you want to use Set instead of just myFunction[myLabel]? You can still get the side effect and you don't need to duplicate myLabel as in myLabel = myFunction[myLabel]. $\endgroup$ Commented May 13, 2024 at 21:02