home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-05-09 | 501 b | 17 lines | [TEXT/PICN] |
- ############################################################################
- #
- # shuffle.icn
- #
- # The procedure shuffle(x) shuffles a string or list. In the case
- # that x is a string, a corresponding string with the characters
- # randomly rearranged is produced. In the case that x is a list,
- # the values in the list are randomly rearranged.
- #
- ############################################################################
-
- procedure shuffle(x)
- x := string(x)
- every !x :=: ?x
- return x
- end
-