MathGroup Archive 2011

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

Search the Archive

Sort[...,p] bug when 'p' fails to evaluate?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115734] Sort[...,p] bug when 'p' fails to evaluate?
  • From: Alexey <lehin.p at gmail.com>
  • Date: Wed, 19 Jan 2011 05:29:07 -0500 (EST)

Hello,

I wonder why treats Sort[...,p] unevaluated comparison function 'p' as
if it was evaluated to True. Is it a bug?

In[1]:= Sort[{a, c, d}, True &]
Sort[{a, c, d}, UndefinedFunction &]
Sort[{a, c, d}, Greater]

Out[1]= {a, c, d}

Out[2]= {a, c, d}

Out[3]= {a, c, d}

I think the expected behavior should be to return unevaluated
Sort[...].


  • Prev by Date: Re: Evaluation of limit
  • Next by Date: adding a keyboard shortcut for double brackets
  • Previous by thread: Re: Do I need MathLink to run finite-difference fast enough for Manipulate?
  • Next by thread: adding a keyboard shortcut for double brackets