lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> The manual at present does not spell out what properties "comp"
> should have to be a valid function. Maybe it should say "At most
> one of `comp(a,b)` and `comp(b,a)` may be true."

It says this about 'comp':

  a function that receives two list elements and returns true when the
  first element must come before the second in the final order

It does not take deep logic to conclude that no result is possible
if 'comp(a,b)' and 'comp(b,a)' are both true.  But we can state that
'comp' must be asymmetric and transitive, if that helps.

-- Roberto