Icon+Unicon/Intro: Difference between revisions

m
Line 120:
 
==== Tables ====
Tables (mutable) are structures where values are indexed by unique keys. Syntactically they look a lot like lists indexed by arbitrary values. Tables are one of the most commonly used and powerful features of Icon/Unicon.
<lang Icon> T := table(0) # table with default 0 values
every T[!words] +:= 1 # counts words</lang>
Anonymous user