Then, each argument on the command line is used as a key in the table to increment a counter. The table is sorted, producing a list of two-element lists containing the keys and their values. These pairs are removed from the list one at a time, and the keys and values are written out. They give the language simpler, more intuitive notation, so they are worth making a mental leap. Generators can produce more than one value, and expression evaluation tries each value from a generator until it finds one that makes the enclosing expression succeed and produce a value.
Generators are a very natural way to write procedures that compute a sequence of values.
Each time a suspend occurs, a result is produced for the surrounding expression, and if the surrounding expression fails, the call is resumed where it left off, at the suspend . Graphics and User Interfaces Icon's built-in graphics have about 40 functions and introduce only one new type, the window, which is a special extension of the file type. This contrasts with graphics APIs in other languages where learning graphics means learning 400 or more functions that manipulate several dozen new types of values. Passing strings and integers into a few functions is all you need to write amazing graphics without excessive code. In the loop, for each user event, the ten-pixel square is erased and redrawn at the new mouse location.