Programming Corner from Icon Newsletter 9


August 22, 1982; Icon Version 5


The programming corner is short this time (most of our available energy in this area is going toward the Icon book). The following shuffling procedure, contributed by Ward Cunningham of Tektronix Computer Research Laboratory, deserves publication, however:
procedure shuffle(x)
   every !x :=: ?x
   return x
end
Note that this is not the standard algorithm for shuffling as given, for example, by Knuth. Comments on the "effectiveness" of the procedure above are welcome.

Observe that x may be a string, list, table, or record. Question: why does this procedure not work for csets?


Icon home page