[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlaplus] How do you write a literal function?



Howdy. 

If I want to write a literal definition of a function that has a sequential set of integers as its domain, I can of course use the tuple syntax `<<"a", "b", "c">>`, but how might I go about doing this with anything but an integer index, e.g. a string? For example, what if I wanted to have something more or less akin to this in _javascript_: 

var myObj = {
  "foo":"bar",
  "baz": "blah"
}

myObj["foo"] // "bar". 


--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/f57ef2a7-212b-465e-a3de-fac154d233cco%40googlegroups.com.