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[...].