MathGroup Archive 1998

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

Search the Archive

Re: FixedPoint and SameTest


  • To: mathgroup@smc.vnet.net
  • Subject: [mg11840] Re: FixedPoint and SameTest
  • From: Pasquale Nardone <pnardon@ulb.ac.be>
  • Date: Wed, 1 Apr 1998 00:35:45 -0500
  • Organization: ULB
  • References: <6fq65t$d6e$3@dragonfly.wolfram.com>

yet another way, define:

NextOne[f_,Alist_]:=Join[liste,{f[Last[Alist]]}];

(in fact this is just "AppendTo")
then

SeedRandom[88];
FixedPointList[NextOne[Random[Integer, {1, # + 4}]&,#]&,{5},
  SameTest->((Length[Complement[#2]]==Length[Complement[#1]])&)]

stopproperly

{{5},{5,4},{5,4,2},{5,4,2,4}}


> ___________________________________________________________________
> >Paul Abbott                                   Phone: +61-8-9380-2734
> >Department of Physics                           Fax: +61-8-9380-1014
> >The University of Western Australia            Nedlands WA  6907
> >mailto:paul@physics.uwa.edu.au  AUSTRALIA
> >http://www.pd.uwa.edu.au/~paul
> >
> >            God IS a weakly left-handed dice player
> >____________________________________________________________________
> >





  • Prev by Date: RE: fractional simplification
  • Next by Date: Re: Questions about functions.
  • Prev by thread: Re: fractional simplification
  • Next by thread: Re: Questions about functions.