4.3BSD/usr/contrib/icon/src/lib/shuffle.icn

#	SHUFFLE(2)
#
#	Shuffle values
#
#	Ralph E. Griswold
#
#	Last modified 5/15/83
#

procedure shuffle(x)
   x := string(x)
   if not(type(x) == ("string" | "list")) then xstop(x)
   every !x :=: ?x
   return x
end

procedure xstop(x)
   stop("Run-time error 102 in shuffle_
      \nstring or list expected\noffending value: ",
      image(x))
end