Immutable containers have nice subtype relationships: arrays <= ordered dictionaries <= unordered maps <= weak maps <= functions.
An array is an ordered dictionary in which the keys are consecutive natural numbers 0..length.
-
-
A dictionary is a map in which the keys appear in order. A map is a weak map in which the keys are user-visible.
-
Ths holds only because of immutability, thus we compare by-value (rather than by-reference). Covariance is our friend.
End of conversation
New conversation -
-
-
A pure function is a weak map in which the values are computed on demand.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
oh, now i get it. yes, lua makes use of that relationship.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.