MathGroup Archive 2006

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

Search the Archive

Re: Use pattern to find minimum without using min


Hi,

{9, 4, 6, 5, 3, 7} //. {{x_, y_, z___} :> {x, z} /; (x < y),
      {x_, y_, z__} :> {y, x, z}}
??
Regards
   Jens

wooks wrote:
> Tried
> 
> {9, 4, 6, 5, 3, 7} //. {a___, b_, c___, d_, e___} :> b /; (b < d)
> 
> and
> 
> {9, 4, 6, 5, 3, 7} //. {x_,y_,z___} :> {x,z} /; (x<y)
> 
> without much success.
> 


  • Prev by Date: Re: Use pattern to find minimum without using min
  • Next by Date: Re: Use pattern to find minimum without using min
  • Previous by thread: Re: Use pattern to find minimum without using min
  • Next by thread: Re: Use pattern to find minimum without using min