Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Unique List

  • To: mathgroup at christensen.Cybernetics.NET
  • Subject: [mg383] Re: [mg358] Unique List
  • From: wmm at (Martin McClain)
  • Date: Fri, 30 Dec 94 12:52:18 EST

>OK, time for a little fun...

How come nobody remembered Union? It needs no package; it is one of the
core operators.  Also, this one maintains the random order of the original
trials.  And thanks to Dana Scott for the improvement 42->52.

While[len != 6,
	       hand = Table[Random[Integer,{1,52}],{6}];
	       len = Length[Union[hand]]

I think a lot of us forget that readability is very important to
non-hotshot users of Mathematica, who are the audience.

Martin McClain

  • Prev by Date: Wave File Conversion
  • Next by Date: Re: Re: Simple Solve Question
  • Previous by thread: Re: Re: Unique List
  • Next by thread: Re: Re: Unique List